/* ============ Rehman Labs — modern dark theme ============ */
:root {
  --bg: #0b0b14;
  --bg-2: #11111f;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-2: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.09);
  --text: #eef0f6;
  --muted: #a3a7b8;
  --accent: #7c5cff;
  --accent-2: #b06cff;
  --accent-3: #4f7cff;
  --radius: 16px;
  --maxw: 1140px;
  --shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.6);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Sora", var(--font);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---- Background orbs ---- */
.bg-orbs { position: fixed; inset: 0; z-index: -1; overflow: hidden; }
.orb { position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.5; }
.orb-1 { width: 520px; height: 520px; background: #5b3cff; top: -160px; left: -120px; }
.orb-2 { width: 460px; height: 460px; background: #b06cff; top: 30%; right: -160px; opacity: 0.35; }
.orb-3 { width: 420px; height: 420px; background: #2f6bff; bottom: -180px; left: 30%; opacity: 0.3; }

/* ---- Typography ---- */
h1, h2, h3, h4 { font-family: var(--display); line-height: 1.15; letter-spacing: -0.02em; }
.grad {
  background: linear-gradient(100deg, var(--accent-3), var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.eyebrow {
  display: inline-block; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--accent-2); margin-bottom: 14px;
}
.status-pill {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 18px;
  font-size: 0.82rem; font-weight: 600; color: #c8f5dd;
  background: rgba(79, 209, 165, 0.1); border: 1px solid rgba(79, 209, 165, 0.3);
  padding: 6px 14px; border-radius: 30px;
}
.status-dot {
  width: 8px; height: 8px; border-radius: 50%; background: #4fd1a5;
  box-shadow: 0 0 0 0 rgba(79, 209, 165, 0.6); animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(79, 209, 165, 0.55); }
  70% { box-shadow: 0 0 0 7px rgba(79, 209, 165, 0); }
  100% { box-shadow: 0 0 0 0 rgba(79, 209, 165, 0); }
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 600; font-size: 0.95rem; padding: 13px 22px; border-radius: 12px;
  border: 1px solid transparent; cursor: pointer; transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
}
.btn-primary {
  background: linear-gradient(100deg, var(--accent-3), var(--accent));
  color: #fff; box-shadow: 0 10px 30px -10px rgba(124, 92, 255, 0.7);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 40px -12px rgba(124, 92, 255, 0.9); }
.btn-ghost { background: var(--surface); border-color: var(--border); color: var(--text); }
.btn-ghost:hover { background: var(--surface-2); transform: translateY(-2px); }
.btn-sm { padding: 9px 16px; font-size: 0.88rem; }
.btn-block { width: 100%; }

/* ---- Navbar ---- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  transition: background .3s ease, border-color .3s ease, backdrop-filter .3s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(11, 11, 20, 0.72); backdrop-filter: blur(14px);
  border-bottom-color: var(--border);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; gap: 9px; font-family: var(--display); font-weight: 800; font-size: 1.12rem; }
.brand-mark { width: 30px; height: 30px; border-radius: 8px; display: block; }
.footer-brand .brand-mark { width: 26px; height: 26px; }
.nav-links { display: flex; gap: 30px; }
.nav-links a { color: var(--muted); font-weight: 500; font-size: 0.94rem; transition: color .2s; }
.nav-links a:hover { color: var(--text); }
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 6px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: .3s; }

/* ---- Hero ---- */
.hero { padding: 150px 0 80px; }
.hero-inner { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items: center; }
.hero-title { font-size: clamp(2.3rem, 5vw, 3.6rem); font-weight: 800; margin-bottom: 22px; }
.hero-sub { font-size: 1.12rem; color: var(--muted); max-width: 540px; margin-bottom: 30px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 44px; }
.hero-stats { display: flex; gap: 40px; flex-wrap: wrap; }
.hero-stats strong { font-family: var(--display); font-size: 1.5rem; display: block; color: var(--text); }
.hero-stats span { font-size: 0.85rem; color: var(--muted); }

/* Code window */
.code-window {
  background: linear-gradient(180deg, #12121f, #0d0d18);
  border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
}
.code-bar {
  display: flex; align-items: center; gap: 7px; padding: 13px 16px;
  border-bottom: 1px solid var(--border); background: rgba(255,255,255,0.02);
}
.code-bar span { width: 12px; height: 12px; border-radius: 50%; background: #2c2c3e; }
.code-bar span:nth-child(1) { background: #ff5f57; }
.code-bar span:nth-child(2) { background: #febc2e; }
.code-bar span:nth-child(3) { background: #28c840; }
.code-bar em { margin-left: auto; font-style: normal; font-size: 0.8rem; color: var(--muted); }
.code-body {
  padding: 22px; font-family: "SFMono-Regular", "JetBrains Mono", Consolas, monospace;
  font-size: 0.9rem; line-height: 1.7; color: #cdd2e4; white-space: pre; overflow-x: auto;
}
.c-com { color: #6b7194; } .c-key { color: #b06cff; } .c-fn { color: #4f9cff; } .c-str { color: #4fd1a5; }

/* ---- Strip ---- */
.strip { border-block: 1px solid var(--border); background: var(--bg-2); }
.strip-inner {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 14px 40px;
  padding: 24px; color: var(--muted); font-weight: 600; font-size: 0.95rem;
}
.strip-inner span { opacity: 0.7; transition: opacity .2s, color .2s; }
.strip-inner span:hover { opacity: 1; color: var(--text); }

/* ---- Sections ---- */
.section { padding: 96px 0; }
.section-alt { background: var(--bg-2); }
.section-head { max-width: 640px; margin: 0 auto 56px; text-align: center; }
.section-head h2 { font-size: clamp(1.8rem, 3.5vw, 2.5rem); margin-bottom: 16px; }
.section-head p { color: var(--muted); font-size: 1.05rem; }

/* ---- Grids ---- */
.grid { display: grid; gap: 22px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

/* Service cards */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 30px; transition: transform .2s ease, border-color .2s ease, background .2s ease;
}
.card:hover { transform: translateY(-5px); border-color: rgba(124,92,255,0.5); background: var(--surface-2); }
.card-icon {
  width: 52px; height: 52px; display: grid; place-items: center; font-size: 1.5rem;
  border-radius: 13px; background: linear-gradient(135deg, rgba(124,92,255,0.22), rgba(79,124,255,0.12));
  border: 1px solid var(--border); margin-bottom: 18px;
}
.card h3 { font-size: 1.18rem; margin-bottom: 10px; }
.card p { color: var(--muted); font-size: 0.96rem; }

/* Work cards */
.work-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px; transition: transform .2s, border-color .2s;
}
.work-card:hover { transform: translateY(-4px); border-color: rgba(176,108,255,0.5); }
.work-top { margin-bottom: 14px; }
.tag {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--accent-2); background: rgba(176,108,255,0.12); padding: 5px 11px; border-radius: 20px;
}
.work-card h3 { font-size: 1.25rem; margin-bottom: 10px; }
.work-card p { color: var(--muted); font-size: 0.96rem; margin-bottom: 16px; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li {
  font-size: 0.78rem; color: var(--text); background: var(--surface-2);
  border: 1px solid var(--border); padding: 4px 11px; border-radius: 8px;
}

/* Stack */
.stack-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.stack-col {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 26px;
}
.stack-col h4 { color: var(--accent-2); font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 16px; }
.stack-col ul { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.stack-col li { color: var(--muted); font-size: 0.96rem; padding-left: 18px; position: relative; }
.stack-col li::before { content: "▹"; position: absolute; left: 0; color: var(--accent); }

/* Process */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.step {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px; position: relative;
}
.step-no { font-family: var(--display); font-size: 2.2rem; font-weight: 800; color: rgba(124,92,255,0.35); display: block; margin-bottom: 8px; }
.step h3 { font-size: 1.15rem; margin-bottom: 8px; }
.step p { color: var(--muted); font-size: 0.94rem; }

/* About */
.about-inner { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 56px; align-items: center; }
.about-photo { position: relative; max-width: 340px; }
.about-photo img {
  width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 24px;
  border: 1px solid var(--border); box-shadow: var(--shadow);
}
.about-photo img.photo-fallback {
  display: grid; place-items: center; font-family: var(--display); font-weight: 800; font-size: 4rem; color: #fff;
  background: linear-gradient(135deg, var(--accent-3), var(--accent-2));
}
.about-badge {
  position: absolute; bottom: -14px; left: 50%; transform: translateX(-50%);
  background: var(--bg-2); border: 1px solid var(--border); border-radius: 30px;
  padding: 9px 18px; font-size: 0.85rem; font-weight: 600; white-space: nowrap; box-shadow: var(--shadow);
}
.about-copy h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); margin-bottom: 18px; }
.about-copy p { color: var(--muted); margin-bottom: 16px; }
.about-copy strong { color: var(--text); }
.about-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 24px; }

/* Contact */
.contact-inner { display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px; align-items: start; }
.contact-copy h2 { font-size: clamp(1.8rem, 3.5vw, 2.5rem); margin-bottom: 14px; }
.contact-copy > p { color: var(--muted); margin-bottom: 28px; }
.contact-list { list-style: none; display: flex; flex-direction: column; gap: 16px; }
.contact-list li { display: flex; align-items: center; gap: 12px; color: var(--muted); }
.contact-list a:hover { color: var(--accent-2); }

.contact-form {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 30px;
}
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 0.88rem; font-weight: 600; margin-bottom: 7px; }
.field .opt { color: var(--muted); font-weight: 400; }
.field input, .field textarea {
  width: 100%; background: var(--bg); border: 1px solid var(--border); border-radius: 10px;
  padding: 12px 14px; color: var(--text); font-family: inherit; font-size: 0.96rem; transition: border-color .2s, box-shadow .2s;
}
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(124,92,255,0.18);
}
.field textarea { resize: vertical; }
.hp { display: none !important; }
.form-status { margin-top: 14px; font-size: 0.92rem; text-align: center; min-height: 1.2em; }
.form-status.ok { color: #4fd1a5; }
.form-status.err { color: #ff7b7b; }

/* Footer */
.footer { border-top: 1px solid var(--border); background: var(--bg-2); padding: 44px 0; }
.footer-inner { text-align: center; }
.footer-brand { display: inline-flex; align-items: center; gap: 9px; font-family: var(--display); font-weight: 800; font-size: 1.1rem; margin-bottom: 10px; }
.footer p { color: var(--muted); font-size: 0.92rem; }
.footer .copy { margin-top: 10px; opacity: 0.7; font-size: 0.85rem; }

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

/* ---- Responsive ---- */
@media (max-width: 920px) {
  .hero-inner, .about-inner, .contact-inner { grid-template-columns: 1fr; }
  .hero-card { order: -1; }
  .grid-3, .stack-grid, .steps { grid-template-columns: repeat(2, 1fr); }
  .about-photo { margin: 0 auto; }
  .nav-links, .nav-cta { display: none; }
  .nav-toggle { display: flex; }
  .nav.open .nav-links {
    display: flex; flex-direction: column; position: absolute; top: 72px; left: 0; right: 0;
    background: rgba(11,11,20,0.96); backdrop-filter: blur(14px); padding: 20px 24px; gap: 18px;
    border-bottom: 1px solid var(--border);
  }
}
@media (max-width: 560px) {
  .grid-2, .grid-3, .stack-grid, .steps { grid-template-columns: 1fr; }
  .hero { padding-top: 120px; }
  .hero-stats { gap: 26px; }
  .section { padding: 70px 0; }
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}
