:root {
  --bg: #FAF7F0;
  --surface: #FFFFFF;
  --ink: #17140F;
  --muted: #6F6859;
  --line: #E8E2D6;
  --pink: #D6287A;
  --purple: #86398E;
  --yellow: #F9B826;
  --teal: #1BB3A5;
  --shadow: 0 1px 2px rgba(40, 30, 15, .06), 0 24px 60px -24px rgba(60, 40, 20, .28);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: "Hind Siliguri", "Noto Sans Bengali", "Nirmala UI", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }

/* ---------- soft colour glows (parallax layers) ---------- */
.glow { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.blob {
  position: absolute;
  width: 56vmax; height: 56vmax;
  border-radius: 50%;
  will-change: transform;
  opacity: .55;
}
.b1 { top: -26vmax; right: -18vmax; background: radial-gradient(closest-side, rgba(249, 184, 38, .55), transparent); }
.b2 { bottom: -30vmax; left: -22vmax; background: radial-gradient(closest-side, rgba(214, 40, 122, .32), transparent); }
.b3 { top: 30%; left: 38%; width: 40vmax; height: 40vmax; background: radial-gradient(closest-side, rgba(27, 179, 165, .22), transparent); }

/* big faint outlined ২৮ behind everything */
.watermark {
  position: absolute;
  right: -4vw; top: 6vh;
  font-size: clamp(260px, 42vw, 640px);
  font-weight: 700;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 2px rgba(23, 20, 15, .07);
  user-select: none;
  will-change: transform;
}

/* small line shapes, each at its own depth */
.fl { position: absolute; width: 34px; height: 34px; opacity: .55; will-change: transform; }
.f1 { left: 6%;  top: 22%; }
.f2 { left: 44%; top: 12%; width: 26px; }
.f3 { left: 30%; top: 78%; }
.f4 { left: 52%; top: 64%; width: 22px; }
.f5 { left: 3%;  top: 58%; width: 56px; height: 28px; }
.f6 { right: 4%; top: 46%; }
.f7 { right: 34%; top: 88%; width: 30px; }
.f8 { right: 10%; top: 90%; width: 20px; }
@media (max-width: 860px) {
  .fl { opacity: .4; }
  .f2, .f4 { display: none; }
  .watermark { top: 2vh; right: -10vw; }
}

/* ---------- in-app browser notice + save sheet ---------- */
.inapp-bar { display: none; }
.inapp .inapp-bar {
  display: flex; flex-direction: column; gap: 10px;
  margin: 12px 16px 0; padding: 14px 16px;
  border: 1px solid #F3C7DA; border-radius: 18px;
  background: #FFF1F6; color: var(--ink);
  font-size: 14px; line-height: 1.5;
}
.inapp-bar p { margin: 0; }
.inapp-bar b { display: block; font-size: 15px; }
.tip-android, .tip-ios { display: none; color: var(--muted); }
.android .tip-android, .ios .tip-ios { display: inline; }
.btn-ink { background: var(--ink); color: #fff; min-height: 46px; }

.save-sheet {
  position: fixed; inset: 0; z-index: 50;
  display: grid; place-items: center;
  padding: 16px;
  background: rgba(23, 20, 15, .72);
}
.save-sheet[hidden] { display: none; }
.save-card {
  width: min(100%, 460px);
  background: var(--surface);
  border-radius: 24px;
  padding: 14px;
  display: grid; gap: 12px;
  text-align: center;
  font-size: 15px;
}
.save-card img { width: 100%; border-radius: 14px; -webkit-touch-callout: default; user-select: auto; }
.save-card p { margin: 0 6px; }

/* ---------- nav ---------- */
.nav {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 20px 24px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand img { width: 150px; }
.tag {
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .6);
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
}

/* ---------- hero: intro + tool ---------- */
.hero {
  flex: 1;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 24px 56px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 440px);
  gap: clamp(32px, 6vw, 88px);
  align-items: center;
}
.lockup { width: min(100%, 290px); margin: 0 0 14px -6px; }
h1 {
  margin: 0;
  font-size: clamp(28px, 3.6vw, 42px);
  line-height: 1.22;
  font-weight: 700;
  letter-spacing: -.005em;
}
.lead { margin: 14px 0 0; max-width: 34em; color: var(--muted); font-size: clamp(16px, 1.6vw, 18px); }

.steps { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 14px; max-width: 30em; }
.steps li { display: flex; gap: 14px; align-items: flex-start; }
.steps span {
  flex: none;
  display: grid; place-items: center;
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1.5px solid var(--ink);
  font-weight: 700; font-size: 15px;
}
.steps b { display: block; line-height: 1.4; }
.steps small { display: block; color: var(--muted); font-size: 14px; line-height: 1.5; }

.privacy {
  margin: 28px 0 0;
  display: flex; gap: 10px; align-items: center;
  color: var(--muted); font-size: 14px;
}
.privacy svg { flex: none; color: var(--teal); }

/* ---------- tool card ---------- */
.tool {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 16px;
  box-shadow: var(--shadow);
}
.stage {
  position: relative;
  aspect-ratio: 1;
  border-radius: 18px;
  overflow: hidden;
  background: var(--bg);
  touch-action: none;
}
.stage canvas {
  display: block;
  width: 100%; height: 100%;
  cursor: pointer;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.stage.has-img canvas { cursor: grab; }
.stage.dragging canvas { cursor: grabbing; }
.drop-hint {
  position: absolute; inset: 10px;
  display: grid; place-items: center;
  border: 2px dashed var(--pink);
  border-radius: 14px;
  background: rgba(255, 255, 255, .75);
  color: var(--pink); font-weight: 700; font-size: 20px;
  opacity: 0; pointer-events: none; transition: opacity .15s;
}
.stage.over .drop-hint { opacity: 1; }

.controls { display: grid; gap: 12px; margin-top: 16px; }
.row { display: flex; gap: 10px; }
.row .btn { flex: 1; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 999px;
  font: inherit; font-weight: 700; font-size: 16px;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s, border-color .15s, transform .1s, box-shadow .15s;
  -webkit-tap-highlight-color: transparent;
}
.btn:active:not(:disabled) { transform: scale(.98); }
.btn-ghost { background: var(--surface); border-color: var(--line); color: var(--ink); }
.btn-ghost:hover:not(:disabled) { border-color: var(--ink); }
.btn-accent {
  flex: 2 !important;
  background: linear-gradient(135deg, var(--pink), var(--purple));
  color: #fff;
  box-shadow: 0 10px 24px -12px rgba(214, 40, 122, .8);
}
.btn-accent:hover:not(:disabled) { box-shadow: 0 14px 28px -12px rgba(214, 40, 122, .9); }
.btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.file { position: relative; overflow: hidden; }
.file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; font-size: 0; }
.stage:not(.has-img) ~ .controls .file { background: var(--ink); border-color: var(--ink); color: #fff; }

.zoom { display: flex; align-items: center; gap: 12px; padding: 0 2px; }
.icon {
  flex: none;
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 50%;
  background: var(--surface); color: var(--ink);
  cursor: pointer;
}
.icon:hover:not(:disabled) { border-color: var(--ink); }
.icon-lg { width: 50px; height: 50px; }
.icon[hidden] { display: none; }
.actions { display: flex; align-items: center; gap: 10px; }
.actions .btn-accent { flex: 1 !important; min-width: 0; }
.icon:disabled { opacity: .45; cursor: not-allowed; }

input[type=range] { flex: 1; height: 28px; margin: 0; background: transparent; -webkit-appearance: none; appearance: none; }
input[type=range]::-webkit-slider-runnable-track { height: 4px; border-radius: 4px; background: var(--line); }
input[type=range]::-moz-range-track { height: 4px; border-radius: 4px; background: var(--line); }
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 20px; height: 20px; margin-top: -8px;
  border-radius: 50%; background: var(--ink); border: 3px solid #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .3);
}
input[type=range]::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: var(--ink); border: 3px solid #fff; }
input[type=range]:disabled { opacity: .45; }

.btn:focus-visible, .icon:focus-visible, .file:focus-within, canvas:focus-visible, input[type=range]:focus-visible, .brand:focus-visible {
  outline: 3px solid var(--purple); outline-offset: 3px;
}

.msg { min-height: 1.5em; margin: 10px 4px 0; color: var(--pink); font-weight: 700; font-size: 15px; text-align: center; }
.msg:empty { margin: 0; min-height: 0; }

/* follow links: quiet list rows, brand colour only on the small icon tile */
.social { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.social-note {
  margin: 0 0 2px;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: .01em;
}
.tags {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 8px 8px 14px;
  border: 1px solid #CFE0F5;
  border-radius: 16px;
  background: #EEF5FD;
  text-align: left;
  margin-bottom: 6px;
}
.tags-text { flex: 1; min-width: 0; color: #1F5FAF; font-weight: 700; font-size: 16px; line-height: 1.4; word-break: break-word; user-select: all; }
.tags-copy {
  flex: none;
  min-width: 64px; height: 40px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface); color: var(--ink);
  font: inherit; font-weight: 700; font-size: 15px;
  cursor: pointer;
  transition: border-color .15s, background-color .15s, color .15s;
}
.tags-copy:hover { border-color: var(--ink); }
.tags-copy.done { background: var(--teal); border-color: var(--teal); color: #fff; }
.tags-copy:focus-visible { outline: 3px solid var(--purple); outline-offset: 2px; }

.social-link {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px 10px 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--ink);
  text-align: left;
  text-decoration: none;
  transition: border-color .15s, background-color .15s;
}
.social-link:hover { border-color: #CFC7B8; background: #FCFAF6; }
.social-link:focus-visible { outline: 3px solid var(--purple); outline-offset: 2px; }
.s-icon {
  flex: none;
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border-radius: 10px;
  color: #fff;
}
.s-icon.fb { background: #1877F2; }
.s-icon.ig { background: radial-gradient(circle at 30% 107%, #FDD86F 0%, #FA7E1E 30%, #D62976 60%, #962FBF 85%); }
.s-text { flex: 1; min-width: 0; line-height: 1.3; }
.s-text b { display: block; font-size: 15px; }
.s-text small { display: block; color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.s-cta {
  flex: none;
  display: inline-flex; align-items: center; gap: 2px;
  color: var(--muted); font-size: 14px; font-weight: 700;
  transition: color .15s, transform .15s;
}
.social-link:hover .s-cta { color: var(--ink); transform: translateX(2px); }

/* footer credit with the IT team's lab mark */
footer { padding: 20px 24px 28px; text-align: center; color: var(--muted); font-size: 14px; }
.credit {
  display: inline-flex; align-items: center; flex-wrap: wrap; justify-content: center; gap: 10px;
  color: inherit; text-decoration: none;
}
.lab {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 9px 3px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .6);
  color: var(--teal);
}
.lab code {
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 12px; letter-spacing: .12em; color: var(--ink);
}
.credit:hover > span:last-child, .credit:focus-visible > span:last-child { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.credit:focus-visible { outline: 3px solid var(--purple); outline-offset: 4px; border-radius: 6px; }

/* ---------- phone / tablet ---------- */
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding-top: 12px; gap: 22px; text-align: center; }
  .lockup { margin: 0 auto 12px; width: min(78%, 300px); }
  .lead { margin-left: auto; margin-right: auto; }
  .tool { order: 1; width: 100%; max-width: 520px; margin: 0 auto; padding: 12px; border-radius: 24px; }
  .steps, .privacy { order: 2; }
  .intro { display: contents; }
  .intro > :not(.steps):not(.privacy) { order: 0; }
  .steps { margin: 4px auto 0; text-align: left; }
  .privacy { justify-content: center; margin: 0 auto; text-align: left; max-width: 30em; }
  .brand img { width: 120px; }
}
@media (max-width: 380px) {
  .row { flex-wrap: wrap; }
  .tag { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .blob, .fl, .watermark { transform: none !important; }
  .btn { transition: none; }
}
