/* =====================================================
   BRAINBEAST TECHNOLOGIES LLP - styles.css
   1. Design tokens (colors, spacing) as CSS variables
   2. Base / reset
   3. Layout helpers
   4. Components (one block per website section)
   5. Responsive rules
   ===================================================== */

/* ---------- 1. DESIGN TOKENS ----------
   Change these few values and the WHOLE site re-colors. */
:root {
  --bg: #0b0f1a;
  --bg-alt: #0f1424;
  --surface: #151b2e;
  --surface-2: #1b2340;
  --text: #e8ecf8;
  --muted: #9aa4c2;
  --border: rgba(255, 255, 255, 0.09);
  --primary: #6c5ce7;
  --primary-2: #00d2ff;
  --accent: #ff7a59;
  --grad: linear-gradient(135deg, #6c5ce7 0%, #00d2ff 100%);
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  --radius: 18px;
  --font-head: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
}

/* Light theme: script.js adds data-theme="light" on <html> */
[data-theme="light"] {
  --bg: #f6f8ff;
  --bg-alt: #eceffc;
  --surface: #ffffff;
  --surface-2: #f1f3ff;
  --text: #121830;
  --muted: #5b6585;
  --border: rgba(18, 24, 48, 0.1);
  --shadow: 0 20px 50px rgba(60, 70, 130, 0.15);
}

/* ---------- 2. BASE ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  transition: background 0.3s, color 0.3s;
}
h1, h2, h3, h4, h5 { font-family: var(--font-head); line-height: 1.15; margin: 0 0 0.6em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); letter-spacing: -0.01em; }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--primary-2); outline-offset: 3px; }

/* ---------- 3. LAYOUT HELPERS ---------- */
.container { width: min(1160px, 92%); margin-inline: auto; }
.container.narrow { width: min(820px, 92%); }
.section { padding: 100px 0; }
.section.alt { background: var(--bg-alt); }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 56px; }
.section-head p { color: var(--muted); }
.eyebrow {
  display: inline-block; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--primary-2); margin-bottom: 12px;
}
.muted { color: var(--muted); }
.gradient-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 28px; border: 0; border-radius: 999px;
  background: var(--grad); color: #fff; font-weight: 600;
  box-shadow: 0 10px 30px rgba(108, 92, 231, 0.4);
  transition: transform 0.2s, box-shadow 0.2s;
}
.btn:hover { transform: translateY(-3px); box-shadow: 0 14px 36px rgba(108, 92, 231, 0.55); }
.btn-small { padding: 9px 20px; font-size: 0.92rem; }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--border); box-shadow: none; }
.btn-ghost:hover { background: var(--surface); box-shadow: none; }
.btn-light { background: #fff; color: #3b2fb8; box-shadow: 0 10px 30px rgba(0,0,0,.2); }
.btn.full { width: 100%; }

/* Scroll-reveal: elements start hidden, JS adds .visible when scrolled into view */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ---------- 4. COMPONENTS ---------- */

/* Header / nav */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  transition: background 0.3s, box-shadow 0.3s, backdrop-filter 0.3s;
}
.site-header.scrolled {
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--border);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.logo { display: flex; align-items: center; gap: 10px; font-family: var(--font-head); font-weight: 700; font-size: 1.2rem; }
.logo-mark {
  width: 38px; height: 38px; display: grid; place-items: center;
  background: var(--grad); color: #fff; border-radius: 11px; font-size: 1.15rem;
}
.logo-text span { color: var(--primary-2); }
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a:not(.btn) { color: var(--muted); font-weight: 500; font-size: 0.95rem; transition: color 0.2s; }
.nav-links a:not(.btn):hover { color: var(--text); }
.nav-actions { display: flex; gap: 8px; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font-size: 1.05rem;
}
.menu-btn { display: none; }

/* Hero */
.hero { position: relative; padding: 170px 0 90px; overflow: hidden; }
.hero-glow { position: absolute; border-radius: 50%; filter: blur(110px); opacity: 0.45; pointer-events: none; }
.glow-1 { width: 460px; height: 460px; background: #6c5ce7; top: -120px; left: -120px; }
.glow-2 { width: 380px; height: 380px; background: #00d2ff; bottom: 20px; right: -60px; opacity: 0.25; }
.hero-grid { position: relative; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 50px; align-items: center; }
.badge {
  display: inline-block; padding: 7px 16px; border-radius: 999px; font-size: 0.85rem;
  background: var(--surface); border: 1px solid var(--border); color: var(--muted); margin-bottom: 22px;
}
.lead { font-size: 1.15rem; color: var(--muted); max-width: 560px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin: 28px 0; }
.trust { display: flex; flex-wrap: wrap; gap: 8px 24px; color: var(--muted); font-size: 0.92rem; }

.hero-visual { position: relative; }
.code-window {
  background: var(--surface); 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: var(--surface-2); }
.code-bar i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.code-bar i:nth-child(2) { background: #febc2e; }
.code-bar i:nth-child(3) { background: #28c840; }
.code-bar span { margin-left: 10px; font-size: 0.8rem; color: var(--muted); }
.code-window pre { margin: 0; padding: 22px; overflow-x: auto; font-size: 0.88rem; line-height: 1.8; }
.code-window code { font-family: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace; }
.c-k { color: #c792ea; } .c-v { color: #82aaff; } .c-p { color: #f78c6c; }
.c-s { color: #c3e88d; } .c-n { color: #ffcb6b; } .c-f { color: #82aaff; }
.typing::after { content: "▍"; margin-left: 2px; color: var(--primary-2); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.float-card {
  position: absolute; padding: 10px 18px; border-radius: 14px; font-size: 0.88rem; font-weight: 600;
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow);
  animation: float 6s ease-in-out infinite;
}
.fc-1 { top: -18px; right: -10px; }
.fc-2 { bottom: -22px; left: 24px; animation-delay: -2s; }
.fc-3 { bottom: -18px; right: 30px; animation-delay: -4s; }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }

/* Stats */
.stats { padding: 10px 0 40px; }
.stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 34px 20px;
}
.stat { text-align: center; }
.stat strong { display: block; font-family: var(--font-head); font-size: 2.4rem; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat span { color: var(--muted); font-size: 0.92rem; }

/* Cards (services, testimonials) */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 30px; transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}
.card:hover { transform: translateY(-8px); border-color: var(--primary); box-shadow: var(--shadow); }
.card-icon {
  width: 54px; height: 54px; display: grid; place-items: center; font-size: 1.6rem;
  border-radius: 15px; background: var(--surface-2); margin-bottom: 18px;
}
.card p { color: var(--muted); font-size: 0.96rem; }
.card ul li { font-size: 0.9rem; color: var(--muted); padding-left: 22px; position: relative; margin: 6px 0; }
.card ul li::before { content: "✓"; position: absolute; left: 0; color: var(--primary-2); font-weight: 700; }

/* Process steps */
.steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; counter-reset: s; }
.step { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px 22px; }
.step-no { font-family: var(--font-head); font-size: 2rem; font-weight: 700; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.step p { color: var(--muted); font-size: 0.92rem; margin: 0; }

/* Portfolio */
.filters { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-bottom: 36px; }
.chip {
  padding: 9px 22px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface); color: var(--muted); font-weight: 500; transition: all 0.2s;
}
.chip:hover { color: var(--text); }
.chip.active { background: var(--grad); color: #fff; border-color: transparent; }
.work-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.work { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: transform 0.3s, box-shadow 0.3s, opacity 0.4s; }
.work:hover { transform: translateY(-8px); box-shadow: var(--shadow); }
.work.hide { display: none; }
.work-thumb { height: 190px; display: grid; place-items: center; font-size: 3.6rem; }
.work-thumb span { filter: drop-shadow(0 8px 14px rgba(0,0,0,.3)); transition: transform 0.4s; }
.work:hover .work-thumb span { transform: scale(1.2) rotate(-6deg); }
.t1 { background: linear-gradient(135deg, #6c5ce7, #a29bfe); }
.t2 { background: linear-gradient(135deg, #0984e3, #00d2ff); }
.t3 { background: linear-gradient(135deg, #ff7a59, #fdcb6e); }
.t4 { background: linear-gradient(135deg, #00b894, #55efc4); }
.t5 { background: linear-gradient(135deg, #e84393, #fd79a8); }
.t6 { background: linear-gradient(135deg, #2d3436, #636e72); }
.work-body { padding: 22px 24px 26px; }
.work-body small { color: var(--primary-2); font-weight: 600; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; }
.work-body h3 { margin: 6px 0; }
.work-body p { color: var(--muted); font-size: 0.93rem; margin: 0; }

/* Tech stack pills */
.tech { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.tech span {
  padding: 10px 20px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border);
  font-weight: 500; font-size: 0.92rem; transition: transform 0.2s, border-color 0.2s;
}
.tech span:hover { transform: translateY(-4px); border-color: var(--primary-2); }

/* About */
.about-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items: center; }
.about-copy p { color: var(--muted); }
.ticks { margin-top: 20px; }
.ticks li { position: relative; padding-left: 30px; margin: 12px 0; }
.ticks li::before {
  content: "✓"; position: absolute; left: 0; top: 2px; width: 20px; height: 20px; display: grid; place-items: center;
  border-radius: 50%; background: var(--grad); color: #fff; font-size: 0.7rem; font-weight: 700;
}
.values { display: grid; gap: 16px; }
.value { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 26px; }
.value h4 { margin-bottom: 6px; }
.value p { color: var(--muted); margin: 0; font-size: 0.94rem; }

/* Testimonials */
.quote { margin: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 30px; }
.quote p { font-size: 1.02rem; font-style: italic; }
.quote footer { display: flex; flex-direction: column; margin-top: 18px; }
.quote footer span { color: var(--muted); font-size: 0.86rem; }

/* FAQ accordion */
.faq-item { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; margin-bottom: 14px; overflow: hidden; }
.faq-q {
  width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 20px 24px; background: none; border: 0; color: var(--text); font-weight: 600; text-align: left; font-size: 1rem;
}
.faq-q i { font-style: normal; font-size: 1.5rem; color: var(--primary-2); transition: transform 0.3s; }
.faq-item.open .faq-q i { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height 0.35s ease; }
.faq-a p { padding: 0 24px 22px; margin: 0; color: var(--muted); }

/* CTA band */
.cta-band { background: var(--grad); color: #fff; text-align: center; padding: 76px 0; }
.cta-band h2 { margin-bottom: 10px; }
.cta-band p { opacity: 0.9; margin-bottom: 26px; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 56px; align-items: start; }
.contact-info p { color: var(--muted); }
.info-list { margin-top: 26px; }
.info-list li { margin: 14px 0; }
.info-list a:hover { color: var(--primary-2); }
.form { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 34px; box-shadow: var(--shadow); }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 0.88rem; font-weight: 600; margin-bottom: 7px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 13px 16px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--bg); color: var(--text); font: inherit; transition: border-color 0.2s, box-shadow 0.2s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(108, 92, 231, 0.2);
}
.field.invalid input, .field.invalid textarea { border-color: #ff6b6b; }
.err { display: none; color: #ff6b6b; font-size: 0.8rem; margin-top: 5px; }
.field.invalid .err { display: block; }
.form-status { margin: 14px 0 0; font-size: 0.92rem; text-align: center; min-height: 1.4em; }
.form-status.ok { color: #2ecc71; }
.form-status.fail { color: #ff6b6b; }

/* Footer */
.footer { background: var(--bg-alt); border-top: 1px solid var(--border); padding: 64px 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; }
.footer h5 { font-size: 0.95rem; margin-bottom: 14px; }
.footer-grid a:not(.logo) { display: block; color: var(--muted); margin: 8px 0; font-size: 0.93rem; transition: color 0.2s; }
.footer-grid a:not(.logo):hover { color: var(--text); }
.footer-bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  margin-top: 44px; padding: 22px 0; border-top: 1px solid var(--border); color: var(--muted); font-size: 0.86rem;
}
.footer-bottom a:hover { color: var(--text); }

/* Floating buttons */
.whatsapp {
  position: fixed; left: 22px; bottom: 22px; z-index: 90; width: 52px; height: 52px;
  display: grid; place-items: center; border-radius: 50%; background: #25d366; font-size: 1.5rem;
  box-shadow: 0 10px 26px rgba(37, 211, 102, 0.5); transition: transform 0.2s;
}
.whatsapp:hover { transform: scale(1.1); }
.to-top {
  position: fixed; right: 22px; bottom: 22px; z-index: 90; width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--surface); color: var(--text); font-size: 1.2rem;
  opacity: 0; visibility: hidden; transform: translateY(10px); transition: all 0.3s;
}
.to-top.show { opacity: 1; visibility: visible; transform: none; }

/* ---------- 5. RESPONSIVE ---------- */
@media (max-width: 960px) {
  .hero-grid, .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .hero { padding-top: 140px; }
  .hero-visual { max-width: 520px; }
  .card-grid, .work-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 820px) {
  .menu-btn { display: block; }
  .nav-links {
    position: absolute; top: 72px; left: 4%; right: 4%; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 10px;
    box-shadow: var(--shadow); opacity: 0; visibility: hidden; transform: translateY(-10px); transition: all 0.25s;
  }
  .nav-links.open { opacity: 1; visibility: visible; transform: none; }
  .nav-links li a { display: block; padding: 13px 16px; }
  .nav-links .btn { margin: 6px; }
}
@media (max-width: 620px) {
  .section { padding: 72px 0; }
  .card-grid, .work-grid, .steps { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .fc-2 { left: 6px; }
  .form { padding: 24px; }
}

/* Respect users who prefer less motion */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
