/* ==========================================================================
   Bcoding — public site stylesheet
   Design language: Soft Neumorphism — gentle embossed/debossed surfaces,
   pill-shaped controls, single-tone backgrounds — with the Bcoding brand
   accents (magenta / mustard / cyan) carried through as color, not borders.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=Baloo+Da+2:wght@600;700&family=Inter:wght@400;500;600&family=Hind+Siliguri:wght@400;500;600&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  /* Light neumorphic — the true default, so there's no flash of the dark
     theme before JS applies the person's saved preference. */
  --bg: #E9E9EC;
  --text: #2A2B31;
  --muted: #6A6E7B;
  --neu-light: #FFFFFF;   /* soft highlight side of the emboss */
  --neu-dark: #C9CACF;    /* soft shadow side of the emboss */
  --border: #D7D8DD;      /* faint divider, used sparingly */
  --magenta: #E8368F;
  --mustard: #F2A93B;
  --cyan: #2FD9C7;
  --radius: 22px;
  --radius-sm: 14px;
  --font-display-en: 'Space Grotesk', sans-serif;
  --font-display-bn: 'Baloo Da 2', sans-serif;
  --font-body-en: 'Inter', sans-serif;
  --font-body-bn: 'Hind Siliguri', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --shadow-raised: 7px 7px 16px var(--neu-dark), -7px -7px 16px var(--neu-light);
  --shadow-raised-sm: 4px 4px 10px var(--neu-dark), -4px -4px 10px var(--neu-light);
  --shadow-pressed: inset 4px 4px 9px var(--neu-dark), inset -4px -4px 9px var(--neu-light);
}

[data-theme="dark"] {
  --bg: #1E2129;
  --text: #ECEDF3;
  --muted: #9399AA;
  --neu-light: #272B36;
  --neu-dark: #14151B;
  --border: #2B2F3B;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  tap-highlight-color: transparent;
}
html { scroll-behavior: smooth; }
a, button { outline: none; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body-en), var(--font-body-bn);
  line-height: 1.6;
  transition: background 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}

html[lang="bn"] body { font-family: var(--font-body-bn), var(--font-body-en); }

h1, h2, h3, .display {
  font-family: var(--font-display-en), var(--font-display-bn);
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin: 0 0 0.5em;
}
html[lang="bn"] h1, html[lang="bn"] h2, html[lang="bn"] h3, html[lang="bn"] .display {
  font-family: var(--font-display-bn), var(--font-display-en);
  letter-spacing: 0;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}
@media (max-width: 380px) {
  .container { padding: 0 14px; }
}

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  box-shadow: 0 6px 18px -12px var(--neu-dark);
}
.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  max-width: 1120px;
  margin: 0 auto;
}
.brand {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.brand .dot { color: var(--cyan); }

.nav-links {
  display: flex;
  gap: 26px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  font-size: 0.94rem;
  color: var(--muted);
  transition: color 0.2s ease;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); }

.nav-actions { display: flex; align-items: center; gap: 10px; }
.icon-btn {
  background: var(--bg);
  border: none;
  color: var(--text);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 0.85rem;
  font-family: var(--font-mono);
  cursor: pointer;
  box-shadow: var(--shadow-raised-sm);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.icon-btn:hover { transform: translateY(-1px); }
.icon-btn:active { box-shadow: var(--shadow-pressed); transform: translateY(0); }

.btn-submit {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, var(--magenta), var(--mustard));
  color: #100b0d;
  font-weight: 600;
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 0.88rem;
  box-shadow: var(--shadow-raised-sm);
}

.nav-toggle {
  display: none;
  background: var(--bg);
  border: none;
  color: var(--text);
  font-size: 1.2rem;
  cursor: pointer;
  width: 40px; height: 40px;
  border-radius: 999px;
  box-shadow: var(--shadow-raised-sm);
}

@media (max-width: 860px) {
  .nav-links { position: fixed; top: 66px; left: 12px; right: 12px; background: var(--bg); flex-direction: column; padding: 18px 20px; gap: 16px; border-radius: var(--radius); box-shadow: var(--shadow-raised); transform: translateY(-130%); transition: transform 0.25s ease; }
  .nav-links.open { transform: translateY(0); }
  .nav-toggle { display: block; }
}
@media (max-width: 480px) {
  .nav-wrap { padding: 10px 14px; }
  .nav-actions { gap: 6px; }
  .brand { font-size: 0.95rem; }
  .icon-btn { padding: 7px 10px; font-size: 0.76rem; }
  .btn-submit { padding: 7px 12px; font-size: 0.78rem; }
  .nav-toggle { width: 34px; height: 34px; font-size: 1.05rem; }
}
@media (max-width: 360px) {
  .btn-submit .label-text, .btn-submit { padding: 7px 10px; }
  .icon-btn { padding: 6px 9px; font-size: 0.72rem; }
}

/* ---------- Hero ---------- */
.hero {
  padding: 72px 0 56px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; } }

.eyebrow {
  font-family: var(--font-mono);
  color: var(--cyan);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 14px;
  display: inline-block;
}
.hero h1 { font-size: clamp(2rem, 5vw, 3.1rem); }
.hero p.sub { color: var(--muted); font-size: 1.08rem; max-width: 46ch; margin: 18px 0 30px; }

.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn-primary { background: var(--cyan); color: #08161a; box-shadow: var(--shadow-raised-sm); }
.btn-primary:hover { transform: translateY(-2px); }
.btn-primary:active { box-shadow: var(--shadow-pressed); transform: translateY(0); }
.btn-ghost { background: var(--bg); color: var(--text); box-shadow: var(--shadow-raised-sm); }
.btn-ghost:hover { transform: translateY(-2px); }
.btn-ghost:active { box-shadow: var(--shadow-pressed); transform: translateY(0); }

/* Terminal card — signature element */
.terminal {
  background: var(--bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-raised);
}
.terminal-bar {
  display: flex;
  gap: 6px;
  padding: 12px 14px;
  background: var(--bg);
  box-shadow: var(--shadow-pressed);
}
.terminal-bar span { width: 10px; height: 10px; border-radius: 50%; background: var(--neu-dark); }
.terminal-bar span:nth-child(1) { background: var(--magenta); }
.terminal-bar span:nth-child(2) { background: var(--mustard); }
.terminal-bar span:nth-child(3) { background: var(--cyan); }
.terminal-body {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  padding: 20px;
  min-height: 160px;
  color: var(--text);
}
.terminal-body .line { margin-bottom: 10px; opacity: 0; animation: reveal 0.4s ease forwards; }
.cursor { display: inline-block; width: 8px; height: 1.1em; background: var(--cyan); vertical-align: text-bottom; animation: blink 1s step-end infinite; }
@keyframes reveal { to { opacity: 1; } }
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .terminal-body .line { opacity: 1; animation: none; }
  .cursor { animation: none; }
}

/* ---------- Section shared ---------- */
section { padding: 56px 0; }
.section-head { max-width: 60ch; margin-bottom: 36px; }
.section-head h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
.section-head p { color: var(--muted); }

.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 22px;
}
.card {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow-raised);
}
.card h3 { font-size: 1.05rem; margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 0.92rem; margin: 0; }
.card .glyph { font-family: var(--font-mono); color: var(--mustard); font-size: 0.8rem; margin-bottom: 12px; display: block; }

/* ---------- Counter + updates ---------- */
.stats-row { display: flex; gap: 24px; flex-wrap: wrap; margin-bottom: 40px; }
.stat { font-family: var(--font-mono); background: var(--bg); border-radius: var(--radius); padding: 18px 26px; box-shadow: var(--shadow-raised); }
.stat .num { font-size: 2.6rem; color: var(--cyan); font-weight: 500; display: block; }
.stat .label { color: var(--muted); font-size: 0.85rem; }

.update-list { display: flex; flex-direction: column; gap: 14px; }
.update-item {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  flex-wrap: wrap;
  box-shadow: var(--shadow-raised-sm);
}
.update-item .name { font-weight: 600; }
.update-item .type { font-family: var(--font-mono); font-size: 0.75rem; color: var(--muted); text-transform: uppercase; }

/* ---------- Item grid (apps / websites) ---------- */
.item-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 22px; }
.item-card {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: var(--shadow-raised);
}
.item-card h3 { font-size: 1.1rem; }
.item-card p.desc { color: var(--muted); font-size: 0.9rem; flex-grow: 1; }
.item-meta { display: flex; flex-wrap: wrap; gap: 10px 18px; font-size: 0.8rem; font-family: var(--font-mono); color: var(--muted); }
.item-meta b { color: var(--text); font-weight: 500; }
.status-pill {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-family: var(--font-mono);
  background: var(--bg);
  box-shadow: var(--shadow-pressed);
}
.status-pill.live, .status-pill.active { color: var(--cyan); }
.status-pill.beta, .status-pill.progress { color: var(--mustard); }
.status-pill.archived { color: var(--muted); }

.empty-state { color: var(--muted); font-family: var(--font-mono); font-size: 0.9rem; padding: 26px; text-align: center; background: var(--bg); border-radius: var(--radius); box-shadow: var(--shadow-pressed); }

/* ---------- Pricing ---------- */
.pricing-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 22px; }
.pricing-card { background: var(--bg); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow-raised); }
.pricing-card.highlight { box-shadow: var(--shadow-raised), 0 0 0 2px var(--cyan) inset; }
.pricing-card h3 { font-size: 1.25rem; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }
.contact-card { background: var(--bg); border-radius: var(--radius); padding: 22px; display: flex; align-items: center; gap: 14px; box-shadow: var(--shadow-raised); transition: transform 0.15s ease; }
.contact-card:hover { transform: translateY(-2px); }
.contact-card .glyph {
  font-family: var(--font-mono); font-size: 1.2rem; color: var(--magenta);
  width: 42px; height: 42px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg); box-shadow: var(--shadow-pressed); flex-shrink: 0;
}
.contact-card .label { color: var(--muted); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; }
.contact-card .value { font-weight: 600; word-break: break-word; }

/* ---------- Footer ---------- */
.site-footer {
  padding: 32px 0;
  margin-top: 40px;
}
.footer-row { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.footer-row .tagline { font-family: var(--font-mono); color: var(--muted); font-size: 0.85rem; }
.footer-row .rights { color: var(--muted); font-size: 0.8rem; }

/* ---------- Utility ---------- */
.section-alt { background: var(--bg); }
.text-muted { color: var(--muted); }

/* ---------- Floating contact button ---------- */
.contact-fab {
  position: fixed;
  bottom: 22px;
  right: 22px;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 18px 8px 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--magenta), var(--mustard));
  color: #100b0d;
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: 6px 6px 16px var(--neu-dark), -3px -3px 10px var(--neu-light);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  animation: fabPulse 2.8s ease-in-out infinite;
}
.contact-fab .fab-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(16, 11, 13, 0.16);
  font-size: 1.05rem;
  flex-shrink: 0;
}
.contact-fab .fab-label { white-space: nowrap; }
.contact-fab:hover {
  transform: translateY(-2px) scale(1.03);
}
.contact-fab.hidden-fab { display: none; }
@keyframes fabPulse {
  0%, 100% { box-shadow: 6px 6px 16px var(--neu-dark), -3px -3px 10px var(--neu-light), 0 0 0 0 rgba(232, 54, 143, 0.35); }
  50%      { box-shadow: 6px 6px 16px var(--neu-dark), -3px -3px 10px var(--neu-light), 0 0 0 12px rgba(232, 54, 143, 0); }
}
@media (max-width: 480px) {
  .contact-fab { padding: 8px; }
  .contact-fab .fab-label { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .contact-fab { animation: none; }
}

/* ---------- Ambient background (always-on, subtle drifting glow) ---------- */
.ambient-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.ambient-bg span {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.22;
  will-change: transform;
}
.ambient-bg .blob-1 {
  width: 420px; height: 420px;
  background: var(--magenta);
  top: -120px; left: -120px;
  animation: driftA 19s ease-in-out infinite alternate;
}
.ambient-bg .blob-2 {
  width: 380px; height: 380px;
  background: var(--cyan);
  bottom: -140px; right: -100px;
  animation: driftB 23s ease-in-out infinite alternate;
}
.ambient-bg .blob-3 {
  width: 300px; height: 300px;
  background: var(--mustard);
  top: 38%; left: 62%;
  opacity: 0.14;
  animation: driftC 27s ease-in-out infinite alternate;
}
@keyframes driftA { from { transform: translate(0,0); } to { transform: translate(70px, 90px); } }
@keyframes driftB { from { transform: translate(0,0); } to { transform: translate(-60px, -70px); } }
@keyframes driftC { from { transform: translate(0,0) scale(1); } to { transform: translate(-50px, 40px) scale(1.18); } }

[data-theme="light"] .ambient-bg span { opacity: 0.1; filter: blur(120px); }

@media (prefers-reduced-motion: reduce) {
  .ambient-bg span { animation: none; }
}

/* ---------- Rising code snippets (continuous "coding" animation) ---------- */
.ambient-bg .code-line {
  position: absolute;
  bottom: -8%;
  font-family: var(--font-mono);
  white-space: nowrap;
  opacity: 0;
  filter: none;
  border-radius: 0;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  text-shadow: 0 0 14px currentColor;
}
@keyframes codeRiseA {
  0%   { transform: translate(0,0);            opacity: 0; }
  8%   { opacity: 0.22; }
  50%  { transform: translate(14px, -57vh);    opacity: 0.22; }
  92%  { opacity: 0.22; }
  100% { transform: translate(-6px, -115vh);   opacity: 0; }
}
@keyframes codeRiseB {
  0%   { transform: translate(0,0);            opacity: 0; }
  8%   { opacity: 0.22; }
  50%  { transform: translate(-16px, -57vh);   opacity: 0.22; }
  92%  { opacity: 0.22; }
  100% { transform: translate(8px, -115vh);    opacity: 0; }
}
.ambient-bg .line-1 { left: 4%;  color: var(--cyan);    font-size: 0.92rem; animation: codeRiseA 26s linear infinite; animation-delay: 0s; }
.ambient-bg .line-2 { left: 16%; color: var(--muted);   font-size: 0.74rem; animation: codeRiseB 32s linear infinite; animation-delay: 4s; }
.ambient-bg .line-3 { left: 30%; color: var(--magenta); font-size: 0.86rem; animation: codeRiseA 28s linear infinite; animation-delay: 9s; }
.ambient-bg .line-4 { left: 46%; color: var(--mustard); font-size: 0.78rem; animation: codeRiseB 34s linear infinite; animation-delay: 2s; }
.ambient-bg .line-5 { left: 60%; color: var(--cyan);    font-size: 0.9rem;  animation: codeRiseA 30s linear infinite; animation-delay: 12s; }
.ambient-bg .line-6 { left: 74%; color: var(--muted);   font-size: 0.72rem; animation: codeRiseB 27s linear infinite; animation-delay: 6s; }
.ambient-bg .line-7 { left: 86%; color: var(--magenta); font-size: 0.84rem; animation: codeRiseA 33s linear infinite; animation-delay: 15s; }
.ambient-bg .line-8 { left: 95%; color: var(--mustard); font-size: 0.76rem; animation: codeRiseB 29s linear infinite; animation-delay: 8s; }

@media (max-width: 700px) {
  /* Fewer lines on small screens — keeps it light and uncluttered on phones */
  .ambient-bg .line-5, .ambient-bg .line-6, .ambient-bg .line-7, .ambient-bg .line-8 { display: none; }
}
/* Code lines keep animating regardless of reduced-motion — it's a subtle,
   low-amplitude decorative effect, not essential motion. */

/* ---------- Page loader (splash/loading animation) ---------- */
.page-loader {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  transition: opacity 0.45s ease, visibility 0.45s ease;
}
.page-loader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.loader-brand {
  font-family: var(--font-mono);
  font-size: 1.4rem;
  color: var(--text);
  letter-spacing: 0.02em;
}
.loader-brand .dot { color: var(--cyan); animation: blink 1s step-end infinite; }
.loader-bar {
  width: 160px;
  height: 10px;
  background: var(--bg);
  border-radius: 999px;
  overflow: hidden;
  box-shadow: var(--shadow-pressed);
}
.loader-bar-fill {
  width: 40%;
  height: 100%;
  background: linear-gradient(90deg, var(--magenta), var(--mustard), var(--cyan));
  animation: loaderMove 1.1s ease-in-out infinite;
  border-radius: 999px;
}
@keyframes loaderMove {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(280%); }
}
.loader-text {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  min-width: 200px;
  text-align: center;
}
.loader-cursor {
  display: inline-block;
  width: 6px;
  height: 0.9em;
  background: var(--cyan);
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: blink 1s step-end infinite;
}
@media (prefers-reduced-motion: reduce) {
  .loader-bar-fill { animation: none; }
  .loader-brand .dot { animation: none; }
}
