/* BD Tax Calculator — marketing / legal site
   Shared stylesheet. Modern, responsive, light + dark, bilingual (en/bn). */

:root {
  color-scheme: light dark;

  --green-900: #0b3d2e;
  --green-800: #0f5137;
  --green-700: #146c43;
  --green-600: #1a8a55;
  --green-500: #21a366;
  --green-050: #e9f7ef;
  --red: #d7263d;
  --red-soft: #fbe7ea;

  --ink: #0e1a14;
  --muted: #56685e;
  --line: #e3ebe6;
  --surface: #ffffff;
  --surface-2: #f5f9f6;
  --bg: #f2f7f4;

  --radius: 16px;
  --radius-lg: 24px;
  --shadow: 0 1px 2px rgba(11, 61, 46, .05), 0 12px 32px -12px rgba(11, 61, 46, .18);
  --shadow-sm: 0 1px 2px rgba(11, 61, 46, .06), 0 4px 12px -6px rgba(11, 61, 46, .12);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial,
          "Noto Sans Bengali", "Hind Siliguri", sans-serif;
  --maxw: 1080px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #eaf3ee;
    --muted: #9fb5a9;
    --line: #24352c;
    --surface: #182620;
    --surface-2: #0e1815;
    --bg: #0a100d;
    --green-050: #15291f;
    --red-soft: #2a1418;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 16px 40px -16px rgba(0, 0, 0, .7);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4), 0 6px 16px -8px rgba(0, 0, 0, .6);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Language visibility — toggled by [data-lang] on <html> */
html[data-lang="en"] .bn { display: none; }
html[data-lang="bn"] .en { display: none; }

a { color: var(--green-600); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: saturate(1.4) blur(12px);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease, box-shadow .25s ease;
}
.nav.is-scrolled {
  border-color: var(--line);
  box-shadow: 0 1px 0 var(--line), 0 8px 24px -16px rgba(0, 0, 0, .25);
}
.nav .wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 62px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand img { display: block; border-radius: 22%; }
.nav-links { margin-left: auto; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.nav-links a {
  color: var(--muted);
  font-weight: 600;
  font-size: 14px;
  padding: 8px 12px;
  border-radius: 10px;
}
.nav-links a:hover { color: var(--ink); background: var(--surface-2); text-decoration: none; }

.lang-toggle {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-family: inherit;
  font-weight: 700;
  font-size: 13px;
  padding: 7px 12px;
  border-radius: 999px;
  cursor: pointer;
}
.lang-toggle:hover { border-color: var(--green-500); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(120% 120% at 100% 0%, color-mix(in srgb, var(--green-500) 22%, transparent), transparent 60%),
    linear-gradient(180deg, var(--green-900), var(--green-800));
  color: #eafff3;
  isolation: isolate;
}
.hero .wrap {
  padding-top: 68px;
  padding-bottom: 40px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: 28px;
  align-items: center;
}
/* min-width: 0 overrides the grid item's default `auto` minimum size —
   without it, a non-wrapping descendant (the year-ticker marquee) can force
   this whole column to its content width and silently overflow past the
   viewport (clipped invisibly by .hero's overflow:hidden, no scrollbar) on
   narrow screens. */
.hero-copy { position: relative; z-index: 2; min-width: 0; }
.hero .pill {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .18);
  color: #d6ffe8;
  font-size: 13px; font-weight: 700;
  padding: 6px 14px; border-radius: 999px;
}
.hero h1 {
  font-size: clamp(2.1rem, 4.6vw, 3.6rem);
  line-height: 1.06;
  letter-spacing: -.03em;
  margin: 20px 0 14px;
  max-width: 15ch;
  font-weight: 850;
  overflow-wrap: break-word;
}
.hero h1 .accent {
  background: linear-gradient(100deg, #6dffb0, #b6ffe0 55%, #6dffb0);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shine 5s linear infinite;
}
.hero p.lead {
  font-size: clamp(1.02rem, 1.6vw, 1.2rem);
  color: #b9e7cd;
  max-width: 50ch;
  margin: 0 0 28px;
}

/* Animated marquee strip of supported tax years */
.year-ticker {
  margin-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, .14);
  padding-top: 16px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.year-ticker .track {
  display: flex;
  gap: 14px;
  width: max-content;
  animation: marquee 22s linear infinite;
}
.year-ticker .chip {
  flex: none;
  font-size: 12.5px;
  font-weight: 700;
  color: #cdf5df;
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .14);
  padding: 6px 14px;
  border-radius: 999px;
  white-space: nowrap;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@keyframes shine {
  to { background-position: -200% center; }
}

/* ---------- Phone mockup stage ---------- */
.phone-stage {
  position: relative;
  z-index: 1;
  height: clamp(360px, 46vw, 560px);
  display: flex;
  align-items: center;
  justify-content: center;
}
.phone-stage .glow {
  position: absolute;
  inset: -10% -10% -10% -10%;
  background:
    radial-gradient(38% 45% at 55% 42%, color-mix(in srgb, var(--green-500) 55%, transparent), transparent 70%),
    radial-gradient(30% 34% at 78% 70%, color-mix(in srgb, #ffce54 35%, transparent), transparent 70%);
  filter: blur(10px);
  animation: pulse 7s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: .75; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.06); }
}

.phone {
  --pw: clamp(168px, 20vw, 224px);
  width: var(--pw);
  aspect-ratio: 414 / 900;
  border-radius: calc(var(--pw) * .145);
  background: linear-gradient(155deg, #2a2d31, #101214 60%);
  padding: calc(var(--pw) * .028);
  box-shadow:
    0 2px 0 rgba(255, 255, 255, .06) inset,
    0 30px 60px -20px rgba(0, 0, 0, .55),
    0 10px 24px -12px rgba(0, 0, 0, .5);
  position: absolute;
  /* Hard-clip everything inside to this element's own rounded corners.
     This is a self-clip (transform + overflow:hidden on the SAME element),
     which every browser handles reliably — unlike clipping a child through
     a transformed ancestor. It's what actually stops the screenshot's
     square corners (and any compositing seam from a child's own layer)
     from ever poking out past the rounded bezel. */
  overflow: hidden;
  /* Anchor every phone to the exact same center point regardless of the
     flex container (absolutely-positioned children ignore align/justify).
     Centering lives in `transform` so the individual `translate` property
     stays free for the floatY bob animation below (they'd otherwise fight
     over the same longhand and the bob would reset the centering). */
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
.phone .notch {
  position: absolute;
  top: calc(var(--pw) * .035);
  left: 50%;
  transform: translateX(-50%);
  width: 34%;
  height: calc(var(--pw) * .06);
  background: #101214;
  border-radius: 999px;
  z-index: 3;
}
.phone .screen {
  width: 100%;
  height: 100%;
  border-radius: calc(var(--pw) * .12);
  overflow: hidden;
  background: #fff;
  position: relative;
}
.phone .screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  /* Belt-and-suspenders: round the image itself too, in case the parent's
     clip still doesn't apply. */
  border-radius: inherit;
}
.phone .sheen {
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, rgba(255, 255, 255, .16), transparent 30%);
  pointer-events: none;
}

.phone.p-main {
  z-index: 3;
  animation: floatY 6s ease-in-out infinite;
}
.phone.p-left {
  --pw: clamp(126px, 15vw, 172px);
  z-index: 2;
  transform: translate(-50%, -50%) translate(-52%, 8%) rotate(-7deg);
  filter: saturate(.95) brightness(.96);
  opacity: .9;
  animation: floatY 6s ease-in-out infinite .4s;
}
.phone.p-right {
  --pw: clamp(126px, 15vw, 172px);
  z-index: 2;
  transform: translate(-50%, -50%) translate(52%, 12%) rotate(7deg);
  filter: saturate(.95) brightness(.96);
  opacity: .9;
  animation: floatY 6s ease-in-out infinite .8s;
}
@keyframes floatY {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -3.5%; }
}
@media (prefers-reduced-motion: reduce) {
  .phone.p-main, .phone.p-left, .phone.p-right,
  .phone-stage .glow, .year-ticker .track, .hero h1 .accent { animation: none; }
}
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-weight: 700; font-size: 15px;
  padding: 13px 22px; border-radius: 14px;
  border: 1px solid transparent;
  cursor: pointer;
}
.btn-primary { background: #fff; color: var(--green-800); }
.btn-primary:hover { background: #eafff3; text-decoration: none; }
.btn-ghost { background: rgba(255, 255, 255, .08); color: #eafff3; border-color: rgba(255, 255, 255, .22); }
.btn-ghost:hover { background: rgba(255, 255, 255, .16); text-decoration: none; }

.hero-note { margin-top: 22px; font-size: 13px; color: #9fd3b5; }

/* ---------- Store badges (App Store / Google Play) ---------- */
.store-row { display: flex; flex-wrap: wrap; gap: 12px; }
.store-btn {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  background: linear-gradient(160deg, #232326, #030303 75%);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 14px;
  padding: 10px 20px 10px 16px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, .1) inset,
    0 12px 28px -12px rgba(0, 0, 0, .6);
  transition: transform .3s cubic-bezier(.16,1,.3,1), box-shadow .3s ease, border-color .3s ease;
}
.store-btn:hover {
  text-decoration: none;
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, .3);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, .12) inset,
    0 20px 36px -14px rgba(0, 0, 0, .65);
}
.store-btn:active { transform: translateY(-1px); }
/* Diagonal shine sweep on hover — the "premium" cue. */
.store-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 40%, rgba(255, 255, 255, .22) 50%, transparent 60%);
  background-size: 250% 250%;
  background-position: 120% 0;
  transition: background-position .7s ease;
  pointer-events: none;
}
.store-btn:hover::after { background-position: -20% 0; }
.store-btn__icon { width: 25px; height: 25px; flex: none; fill: #fff; position: relative; z-index: 1; }
.store-btn__text { display: flex; flex-direction: column; line-height: 1.15; text-align: left; position: relative; z-index: 1; }
.store-btn__text small { font-size: 10.5px; font-weight: 600; letter-spacing: .03em; opacity: .82; text-transform: uppercase; }
.store-btn__text strong { font-size: 16.5px; font-weight: 750; letter-spacing: -.01em; margin-top: 1px; }
@media (prefers-reduced-motion: reduce) {
  .store-btn, .store-btn::after { transition: none; }
}

/* ---------- Sections ---------- */
section { padding: 64px 0; position: relative; }
section:not(.band)::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(60% 60% at 15% 0%, color-mix(in srgb, var(--green-500) 6%, transparent), transparent 70%);
}
.section-head { max-width: 60ch; margin-bottom: 36px; }
.section-head .eyebrow {
  text-transform: uppercase; letter-spacing: .12em;
  font-size: 12px; font-weight: 800; color: var(--green-600);
}
.section-head h2 {
  font-size: clamp(1.5rem, 3.5vw, 2.2rem);
  line-height: 1.2; letter-spacing: -.01em;
  margin: 10px 0 8px;
}
.section-head p { color: var(--muted); font-size: 1.05rem; margin: 0; }

.grid { display: grid; gap: 18px; }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--green-500) 35%, var(--line));
  box-shadow: var(--shadow);
}
.card .ico {
  width: 44px; height: 44px; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--green-050); color: var(--green-600);
  margin-bottom: 14px;
  font-size: 20px;
  transition: transform .25s ease;
}
.card:hover .ico { transform: scale(1.08) rotate(-4deg); }
.card h3 { margin: 0 0 6px; font-size: 1.1rem; }
.card p { margin: 0; color: var(--muted); font-size: .96rem; }

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .45s ease-out, transform .45s ease-out;
}
.reveal.in-view { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* Staggered delay for direct children of .reveal-stagger — capped so a long
   grid (e.g. 6 feature cards) never leaves the last item visibly lagging. */
.reveal-stagger > * { transition-delay: calc(min(var(--i, 0), 4) * 55ms); }

/* ---------- Stat counters ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.stat {
  text-align: center;
  padding: 22px 12px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.stat .num {
  font-size: clamp(1.6rem, 3.4vw, 2.3rem);
  font-weight: 850;
  letter-spacing: -.02em;
  color: var(--green-600);
  font-variant-numeric: tabular-nums;
}
.stat .label { margin-top: 4px; font-size: .86rem; color: var(--muted); font-weight: 600; }

/* ---------- Screenshot showcase ---------- */
.showcase-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
  align-items: end;
}
.showcase-item { text-align: center; }
.showcase-item .frame {
  position: relative;
  margin: 0 auto 16px;
  width: clamp(120px, 20vw, 176px);
  aspect-ratio: 414 / 900;
  border-radius: calc(clamp(120px, 20vw, 176px) * .145);
  background: linear-gradient(155deg, #2a2d31, #101214 60%);
  padding: calc(clamp(120px, 20vw, 176px) * .028);
  box-shadow: var(--shadow);
  transition: transform .35s cubic-bezier(.16,1,.3,1);
  /* Self-clip (see .phone for why this must live on the transformed element
     itself, not a descendant) so the screenshot's square corners never show
     past the rounded bezel, including during the hover scale/lift. */
  overflow: hidden;
}
.showcase-item:hover .frame { transform: translateY(-6px) scale(1.02); }
.showcase-item .notch {
  position: absolute; top: 4%; left: 50%; transform: translateX(-50%);
  width: 34%; height: 6%; background: #101214; border-radius: 999px; z-index: 2;
}
.showcase-item .screen {
  width: 100%; height: 100%; overflow: hidden; border-radius: calc(clamp(120px, 20vw, 176px) * .12);
  background: #fff;
}
.showcase-item .screen img { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; border-radius: inherit; }
.showcase-item h4 { margin: 0 0 4px; font-size: .98rem; }
.showcase-item p { margin: 0; color: var(--muted); font-size: .84rem; }

/* Alternating band */
.band { background: var(--surface-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* ---------- Legal / doc pages ---------- */
.doc { padding: 48px 0 72px; }
.doc .wrap { max-width: 800px; }
.doc h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); letter-spacing: -.01em; margin: 0 0 6px; }
.doc .updated { color: var(--muted); font-size: 14px; margin: 0 0 32px; }
.doc h2 { font-size: 1.3rem; margin: 36px 0 10px; letter-spacing: -.01em; }
.doc h3 { font-size: 1.06rem; margin: 22px 0 8px; }
.doc p, .doc li { color: var(--ink); }
.doc p { margin: 0 0 14px; }
.doc ul { margin: 0 0 16px; padding-left: 22px; }
.doc li { margin: 6px 0; }
.callout {
  background: var(--green-050);
  border: 1px solid color-mix(in srgb, var(--green-500) 30%, transparent);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin: 20px 0;
  font-size: .96rem;
}
.callout.warn {
  background: var(--red-soft);
  border-color: color-mix(in srgb, var(--red) 30%, transparent);
}
.data-table { width: 100%; border-collapse: collapse; margin: 12px 0 20px; font-size: .92rem; }
.data-table th, .data-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.data-table th { color: var(--muted); font-weight: 700; font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 12px; }
.faq details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 4px 20px;
  box-shadow: var(--shadow-sm);
}
.faq summary {
  cursor: pointer;
  list-style: none;
  font-weight: 700;
  padding: 16px 0;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; font-size: 1.3rem; color: var(--green-600); font-weight: 400; flex: none;
}
.faq details[open] summary::after { content: "\2212"; }
.faq details > p { margin: 0 0 16px; color: var(--muted); }

/* ---------- Contact ---------- */
.contact-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow);
  text-align: center;
}
.contact-card .email {
  display: inline-block; margin-top: 8px;
  font-size: 1.25rem; font-weight: 800; color: var(--green-600);
}

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); background: var(--surface-2); padding: 40px 0; }
.footer .wrap { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; }
.footer .cols { display: flex; gap: 22px; flex-wrap: wrap; margin-left: auto; }
.footer a { color: var(--muted); font-size: 14px; font-weight: 600; }
.footer a:hover { color: var(--ink); }
.footer .fine { width: 100%; color: var(--muted); font-size: 13px; margin-top: 6px; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: minmax(0, 1fr); padding-bottom: 8px; }
  .hero-copy { text-align: center; }
  .hero .pill { margin-inline: auto; }
  .hero h1, .hero p.lead { max-width: none; margin-inline: auto; }
  .store-row { justify-content: center; }
  .cta-row { justify-content: center; }
  .phone-stage { margin-top: 12px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .showcase-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .grid.cols-3 { grid-template-columns: minmax(0, 1fr); }
  .grid.cols-2 { grid-template-columns: minmax(0, 1fr); }
  .nav-links a:not(.lang-toggle) { display: none; }
}
@media (max-width: 480px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .showcase-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
