/* ============================================================
   Sharp Code — AI-Powered Product Engineering
   Design system + components
   ============================================================ */

:root {
  /* Palette */
  --bg: #070A14;
  --bg-2: #0B0F1E;
  --surface: #10162A;
  --surface-2: #151D34;
  --border: rgba(148, 163, 184, 0.14);
  --border-strong: rgba(148, 163, 184, 0.28);

  --text: #EAF0FB;
  --text-soft: #C3CDDF;
  --muted: #8A98B4;

  --primary: #6366F1;   /* indigo */
  --primary-2: #818CFF;
  --cyan: #22D3EE;
  --teal: #2DD4BF;
  --coral: #FB5D75;     /* warm CTA / brand accent (evolved from legacy) */

  --grad: linear-gradient(135deg, #6366F1 0%, #22D3EE 100%);
  --grad-warm: linear-gradient(135deg, #FB5D75 0%, #A855F7 100%);
  --grad-text: linear-gradient(120deg, #A5B4FF 0%, #6EE7F0 55%, #7DE7C8 100%);

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow: 0 18px 48px -18px rgba(3, 6, 20, 0.85);
  --glow: 0 0 0 1px rgba(99, 102, 241, 0.35), 0 20px 60px -20px rgba(99, 102, 241, 0.45);

  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 26px;
  --maxw: 1180px;
  --gutter: clamp(20px, 5vw, 48px);

  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 17px;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Ambient background glows */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(1200px 700px at 78% -8%, rgba(99, 102, 241, 0.20), transparent 60%),
    radial-gradient(900px 600px at 5% 8%, rgba(34, 211, 238, 0.12), transparent 55%),
    radial-gradient(1000px 900px at 50% 120%, rgba(168, 85, 247, 0.10), transparent 60%);
  pointer-events: none;
}

a { color: var(--primary-2); text-decoration: none; transition: color .18s ease; }
a:hover { color: var(--cyan); }

h1, h2, h3, h4 { line-height: 1.12; letter-spacing: -0.025em; margin: 0 0 .5em; font-weight: 700; }
h2 { font-size: clamp(1.9rem, 4vw, 2.75rem); }
h3 { font-size: 1.3rem; letter-spacing: -0.02em; }
p { margin: 0 0 1rem; color: var(--text-soft); }

img { max-width: 100%; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: clamp(64px, 9vw, 120px) 0; position: relative; }
.section--tight { padding: clamp(48px, 6vw, 80px) 0; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 18px;
}
.eyebrow::before { content: ""; width: 22px; height: 1px; background: var(--cyan); opacity: .7; }

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

.lead { font-size: 1.2rem; color: var(--text-soft); max-width: 62ch; }
.muted { color: var(--muted); }
.center { text-align: center; }
.section-head { max-width: 720px; margin: 0 auto clamp(40px, 6vw, 64px); text-align: center; }
.section-head.left { margin-left: 0; text-align: left; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-weight: 600; font-size: 1rem; line-height: 1;
  padding: 15px 26px; border-radius: 999px; border: 1px solid transparent;
  cursor: pointer; transition: transform .16s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--grad); color: #fff; box-shadow: var(--glow); }
.btn-primary:hover { color: #fff; box-shadow: 0 0 0 1px rgba(99,102,241,.5), 0 26px 70px -22px rgba(99,102,241,.7); }
.btn-ghost { background: rgba(255,255,255,0.03); color: var(--text); border-color: var(--border-strong); }
.btn-ghost:hover { color: #fff; border-color: var(--primary-2); background: rgba(99,102,241,0.10); }
.btn-lg { padding: 18px 34px; font-size: 1.05rem; }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(160%) blur(14px);
  background: rgba(7, 10, 20, 0.72);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 72px;
}
.brand { display: inline-flex; align-items: center; gap: 12px; font-weight: 700; font-size: 1.12rem; color: var(--text); letter-spacing: -0.02em; white-space: nowrap; }
.brand:hover { color: var(--text); }
.brand-mark {
  width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center;
  background: var(--grad); color: #fff; font-weight: 800; font-size: 1rem;
  box-shadow: var(--shadow-sm);
}
.brand-mark span { transform: translateY(-1px); }
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a { color: var(--text-soft); font-size: 0.96rem; font-weight: 500; }
.nav-links a:hover { color: #fff; }
.nav-cta { display: flex; align-items: center; gap: 14px; }
.nav-toggle { display: none; background: none; border: 0; color: var(--text); cursor: pointer; padding: 8px; }

.nav-mobile { border-top: 1px solid var(--border); background: rgba(7,10,20,0.96); backdrop-filter: blur(14px); padding: 12px 0 18px; }
.nav-mobile .container { display: flex; flex-direction: column; }
.nav-mobile a { color: var(--text-soft); font-weight: 500; padding: 12px 0; border-bottom: 1px solid var(--border); }
.nav-mobile a:last-child { border-bottom: 0; }

@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-cta .btn-ghost { display: none; }
  .nav-toggle { display: inline-flex; }
}
@media (max-width: 480px) {
  .nav-cta .btn-primary { padding: 11px 16px; font-size: 0.9rem; }
  .nav { height: 64px; }
}
@media (min-width: 861px) {
  .nav-mobile { display: none !important; }
}

/* ---------- Hero ---------- */
.hero { position: relative; padding: clamp(70px, 11vw, 140px) 0 clamp(60px, 8vw, 110px); }
.hero-grid { display: grid; grid-template-columns: 1.08fr 0.92fr; gap: clamp(32px, 5vw, 64px); align-items: center; }
.hero h1 { font-size: clamp(2.5rem, 6.2vw, 4.4rem); font-weight: 800; letter-spacing: -0.035em; }
.hero .lead { font-size: clamp(1.1rem, 2vw, 1.32rem); margin: 22px 0 32px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.hero-note { margin-top: 22px; font-size: 0.92rem; color: var(--muted); display: flex; align-items: center; gap: 10px; }
.pulse { width: 9px; height: 9px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 0 rgba(45,212,191,.6); animation: pulse 2.4s infinite; }
@keyframes pulse { 0%{box-shadow:0 0 0 0 rgba(45,212,191,.55);} 70%{box-shadow:0 0 0 12px rgba(45,212,191,0);} 100%{box-shadow:0 0 0 0 rgba(45,212,191,0);} }

.chip {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 7px 15px; border-radius: 999px; font-size: 0.82rem; font-weight: 500;
  color: var(--text-soft); background: rgba(255,255,255,0.04); border: 1px solid var(--border);
  margin-bottom: 26px;
}
.chip b { color: var(--cyan); font-weight: 600; }

/* Hero visual — code / pipeline card */
.hero-visual {
  position: relative; border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg-2) 100%);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow);
  padding: 22px; overflow: hidden;
}
.hero-visual::after {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px;
  background: linear-gradient(140deg, rgba(99,102,241,.5), transparent 40%, rgba(34,211,238,.35));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none;
}
.win-dots { display: flex; gap: 7px; margin-bottom: 16px; }
.win-dots i { width: 11px; height: 11px; border-radius: 50%; display: block; }
.win-dots i:nth-child(1){background:#FF5F57;} .win-dots i:nth-child(2){background:#FEBC2E;} .win-dots i:nth-child(3){background:#28C840;}
.code { font-family: "SFMono-Regular", ui-monospace, "JetBrains Mono", Consolas, monospace; font-size: 0.86rem; line-height: 1.75; color: #B7C3DD; }
.code .k { color: #C4B5FD; } .code .s { color: #7DE7C8; } .code .c { color: #64748B; } .code .fn { color: #6EE7F0; } .code .n { color: #FBBF87; }
.pipeline { margin-top: 18px; display: grid; gap: 8px; }
.pl-step { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 12px; background: rgba(255,255,255,0.03); border: 1px solid var(--border); font-size: 0.88rem; color: var(--text-soft); }
.pl-step .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--grad); flex: none; }
.pl-step .tag { margin-left: auto; font-size: 0.72rem; color: var(--teal); font-weight: 600; }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { order: 2; }
}

/* ---------- Logo / trust strip ---------- */
.trust { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: rgba(255,255,255,0.015); }
.trust-inner { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; justify-content: center; padding: 26px 0; }
.trust-label { font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.trust-items { display: flex; flex-wrap: wrap; gap: 14px 26px; justify-content: center; }
.trust-items span { font-size: 0.95rem; color: var(--text-soft); font-weight: 600; opacity: .9; display: inline-flex; align-items: center; gap: 8px; }
.trust-items span::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--primary-2); }

/* ---------- Stat band ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.stat { padding: 28px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); text-align: center; }
.stat .num { font-size: clamp(2rem, 4vw, 2.9rem); font-weight: 800; letter-spacing: -0.03em; background: var(--grad-text); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.stat .lbl { font-size: 0.92rem; color: var(--muted); margin-top: 6px; }
@media (max-width: 760px){ .stats { grid-template-columns: repeat(2, 1fr); } }
.stats-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 720px){ .stats-3 { grid-template-columns: 1fr; } }

/* ---------- Cards / services ---------- */
.grid { display: grid; gap: 22px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 940px){ .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px){ .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.card {
  position: relative; padding: 30px; border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface) 0%, rgba(16, 22, 42, 0.6) 100%);
  border: 1px solid var(--border);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
  overflow: hidden;
}
.card:hover { transform: translateY(-4px); border-color: var(--border-strong); box-shadow: var(--shadow); }
.card .ico {
  width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 18px;
  background: rgba(99,102,241,0.12); border: 1px solid rgba(99,102,241,0.28); color: var(--primary-2);
}
.card .ico svg { width: 24px; height: 24px; }
.card h3 { margin-bottom: 10px; }
.card p { color: var(--muted); font-size: 0.98rem; margin: 0; }
.card--feature::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--grad); opacity: 0; transition: opacity .2s ease;
}
.card--feature:hover::before { opacity: 1; }

/* ---------- Capability tiles (AI-driven lifecycle) ---------- */
.cap-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 940px){ .cap-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px){ .cap-grid { grid-template-columns: 1fr; } }
.cap {
  padding: 24px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.cap:hover { transform: translateY(-3px); border-color: var(--border-strong); box-shadow: var(--shadow); }
.cap .ico {
  width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; margin-bottom: 14px;
  background: rgba(34,211,238,0.10); border: 1px solid rgba(34,211,238,0.26); color: var(--cyan);
}
.cap .ico svg { width: 21px; height: 21px; }
.cap h3 { font-size: 1.04rem; margin: 0 0 7px; }
.cap p { font-size: 0.9rem; color: var(--muted); margin: 0; line-height: 1.55; }

/* ---------- Capability page bits ---------- */
.crumbs { font-size: 0.85rem; color: var(--muted); margin-bottom: 24px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.crumbs a { color: var(--text-soft); }
.crumbs a:hover { color: #fff; }
.crumbs .here { color: var(--muted); }
.crumbs span { opacity: .6; }

.cat-block { margin-top: clamp(40px, 6vw, 64px); }
.cat-head { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.cat-head h2 { font-size: 1.5rem; margin: 0; }
.cat-head p { margin: 0; font-size: 0.95rem; max-width: 60ch; }

.cap--link { display: flex; flex-direction: column; text-decoration: none; color: inherit; }
.cap--link h3 { color: var(--text); }
.cap--link:hover h3 { color: #fff; }
.cap-more { margin-top: 14px; font-size: 0.82rem; font-weight: 600; color: var(--cyan); display: inline-flex; align-items: center; gap: 6px; opacity: 0; transform: translateX(-4px); transition: opacity .18s ease, transform .18s ease; }
.cap-more svg { width: 16px; height: 16px; }
.cap--link:hover .cap-more { opacity: 1; transform: none; }

.cap-hero { display: grid; grid-template-columns: 1fr auto; gap: 30px; align-items: center; }
.cap-hero h1 { font-size: clamp(2.1rem, 5.2vw, 3.4rem); font-weight: 800; letter-spacing: -0.03em; }
.cap-hero-badge .ico-xl {
  width: 108px; height: 108px; border-radius: 26px; display: grid; place-items: center;
  background: linear-gradient(180deg, var(--surface), var(--bg-2)); border: 1px solid var(--border-strong);
  color: var(--cyan); box-shadow: var(--shadow);
}
@media (max-width: 720px){ .cap-hero { grid-template-columns: 1fr; } .cap-hero-badge { display: none; } }

/* ---------- Approach / process ---------- */
.steps { display: grid; gap: 20px; grid-template-columns: repeat(4, 1fr); counter-reset: step; }
@media (max-width: 940px){ .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px){ .steps { grid-template-columns: 1fr; } }
.step { position: relative; padding: 28px 26px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.step .n { font-family: ui-monospace, monospace; font-size: 0.85rem; color: var(--cyan); font-weight: 700; letter-spacing: .1em; }
.step h3 { font-size: 1.12rem; margin: 12px 0 8px; }
.step p { font-size: 0.94rem; color: var(--muted); margin: 0; }

/* ---------- Split feature ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 68px); align-items: center; }
@media (max-width: 880px){ .split { grid-template-columns: 1fr; } }
.check-list { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 14px; }
.check-list li { display: flex; gap: 13px; align-items: flex-start; color: var(--text-soft); }
.check-list li::before {
  content: "✓"; flex: none; width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center;
  background: rgba(45,212,191,0.14); color: var(--teal); font-size: 0.8rem; font-weight: 800; margin-top: 2px;
}
.panel {
  border-radius: var(--radius-lg); border: 1px solid var(--border-strong);
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg-2) 100%);
  padding: 30px; box-shadow: var(--shadow); position: relative; overflow: hidden;
}

/* ---------- Engagement models ---------- */
.model { padding: 30px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); display: flex; flex-direction: column; }
.model.featured { border-color: rgba(99,102,241,.5); box-shadow: var(--glow); }
.model .tier { font-size: 0.78rem; text-transform: uppercase; letter-spacing: .12em; color: var(--cyan); font-weight: 700; }
.model h3 { margin: 12px 0 6px; }
.model .desc { color: var(--muted); font-size: 0.96rem; flex: 1; }
.model .meta { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--border); font-size: 0.9rem; color: var(--text-soft); }
.badge { display: inline-block; padding: 4px 11px; border-radius: 999px; font-size: 0.72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; background: var(--grad); color: #fff; margin-left: 8px; }

/* ---------- FAQ ---------- */
.faq { max-width: 820px; margin: 0 auto; display: grid; gap: 14px; }
.faq-item { border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); overflow: hidden; }
.faq-q { width: 100%; text-align: left; background: none; border: 0; color: var(--text); font-size: 1.05rem; font-weight: 600; padding: 20px 22px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; font-family: inherit; }
.faq-q .ic { flex: none; transition: transform .22s ease; color: var(--primary-2); }
.faq-item.open .faq-q .ic { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .28s ease; }
.faq-a-inner { padding: 0 22px 20px; color: var(--muted); font-size: 0.98rem; }
.faq-item.open .faq-a { max-height: 340px; }

/* ---------- CTA band ---------- */
.cta-band {
  position: relative; border-radius: var(--radius-lg); overflow: hidden;
  background: linear-gradient(135deg, rgba(99,102,241,.18), rgba(34,211,238,.10));
  border: 1px solid var(--border-strong);
  padding: clamp(44px, 6vw, 72px); text-align: center;
}
.cta-band::before { content:""; position:absolute; inset:0; background: radial-gradient(600px 300px at 50% -20%, rgba(99,102,241,.35), transparent 70%); pointer-events:none; }
.cta-band h2 { position: relative; }
.cta-band .lead { margin: 0 auto 30px; position: relative; }

/* ---------- Contact form ---------- */
.contact-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 60px); }
@media (max-width: 820px){ .contact-wrap { grid-template-columns: 1fr; } }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--text-soft); margin-bottom: 8px; }
.field input, .field textarea, .field select {
  width: 100%; padding: 14px 16px; border-radius: var(--radius-sm);
  background: var(--bg-2); border: 1px solid var(--border-strong); color: var(--text);
  font-family: inherit; font-size: 1rem; transition: border-color .18s ease, box-shadow .18s ease;
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(99,102,241,.22); }
.field textarea { min-height: 140px; resize: vertical; }
.contact-detail { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 22px; }
.contact-detail .ico { width: 42px; height: 42px; border-radius: 11px; flex: none; display: grid; place-items: center; background: rgba(99,102,241,.12); border: 1px solid rgba(99,102,241,.28); color: var(--primary-2); }
.contact-detail .lbl { font-size: 0.8rem; color: var(--muted); }
.contact-detail .val { color: var(--text); font-weight: 600; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-2); padding: 60px 0 32px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 40px; }
@media (max-width: 760px){ .footer-grid { grid-template-columns: 1fr; gap: 30px; } }
.footer-grid h4 { font-size: 0.82rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin-bottom: 16px; }
.footer-grid a { display: block; color: var(--text-soft); font-size: 0.95rem; margin-bottom: 10px; }
.footer-grid a:hover { color: #fff; }
.footer-about { max-width: 340px; color: var(--muted); font-size: 0.95rem; }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 44px; padding-top: 24px; border-top: 1px solid var(--border); color: var(--muted); font-size: 0.86rem; }

/* ---------- Reveal on scroll (progressive enhancement) ---------- */
/* Default: fully visible, so content shows even if JS is disabled or fails. */
.reveal { opacity: 1; transform: none; }
/* Only hide-then-animate when JS is confirmed active. */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .pulse { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Generic prose pages ---------- */
.prose { max-width: 760px; margin: 0 auto; }
.prose h1 { font-size: clamp(2rem, 5vw, 3rem); }
.prose h2 { font-size: 1.6rem; margin-top: 2em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: .5em; color: var(--text-soft); }
