/* ZiaLipi website. Self-hosted font, no external requests. */

@font-face {
  font-family: "Noto Sans Bengali";
  font-weight: 400;
  font-display: swap;
  src: url("fonts/noto-sans-bengali-bengali-400-normal.woff2") format("woff2");
  unicode-range: U+0951-0952, U+0964-0965, U+0980-09FE, U+1CD0, U+1CD2, U+1CD5-1CD6, U+1CD8, U+1CE1, U+1CEA, U+1CED, U+1CF2, U+1CF5-1CF7, U+200C-200D, U+20B9, U+25CC, U+A8F1;
}
@font-face {
  font-family: "Noto Sans Bengali";
  font-weight: 600;
  font-display: swap;
  src: url("fonts/noto-sans-bengali-bengali-600-normal.woff2") format("woff2");
  unicode-range: U+0951-0952, U+0964-0965, U+0980-09FE, U+1CD0, U+1CD2, U+1CD5-1CD6, U+1CD8, U+1CE1, U+1CEA, U+1CED, U+1CF2, U+1CF5-1CF7, U+200C-200D, U+20B9, U+25CC, U+A8F1;
}
@font-face {
  font-family: "Noto Sans Bengali";
  font-weight: 700;
  font-display: swap;
  src: url("fonts/noto-sans-bengali-bengali-700-normal.woff2") format("woff2");
  unicode-range: U+0951-0952, U+0964-0965, U+0980-09FE, U+1CD0, U+1CD2, U+1CD5-1CD6, U+1CD8, U+1CE1, U+1CEA, U+1CED, U+1CF2, U+1CF5-1CF7, U+200C-200D, U+20B9, U+25CC, U+A8F1;
}
@font-face {
  font-family: "Noto Sans Bengali";
  font-weight: 400;
  font-display: swap;
  src: url("fonts/noto-sans-bengali-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Noto Sans Bengali";
  font-weight: 600;
  font-display: swap;
  src: url("fonts/noto-sans-bengali-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Noto Sans Bengali";
  font-weight: 700;
  font-display: swap;
  src: url("fonts/noto-sans-bengali-latin-700-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --green: #00856a;
  --green-dark: #0b5c46;
  --green-soft: #e3f4ef;
  --red: #f42a41;
  --ink: #17231f;
  --muted: #5d6b66;
  --line: #dde5e2;
  --page: #ffffff;
  --page-alt: #f4f7f6;
  --card: #ffffff;
  --code-bg: #eef3f1;
  --hero-from: #0f2e25;
  --hero-to: #0b5c46;
  --shadow: 0 10px 30px rgb(15 46 37 / 0.12);
  --font: "Noto Sans Bengali", "Nirmala UI", "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e6efec;
    --muted: #9db1aa;
    --line: #2a3a35;
    --page: #0f1714;
    --page-alt: #131e1a;
    --card: #17231f;
    --code-bg: #1f2e29;
    --green-soft: #173a30;
    --shadow: 0 10px 30px rgb(0 0 0 / 0.35);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--green); }
a:hover { color: var(--green-dark); }
@media (prefers-color-scheme: dark) { a { color: #4fd1ad; } a:hover { color: #7fe3c6; } }

code, kbd {
  font-family: var(--mono);
  font-size: 0.86em;
  background: var(--code-bg);
  border-radius: 5px;
  padding: 0.1em 0.4em;
}
kbd { border: 1px solid var(--line); border-bottom-width: 2px; }

.wrap { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; z-index: 10; background: var(--page); padding: 8px 12px; }

/* Header */
.top {
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--page) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.top-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 1.2rem; }
.brand img { border-radius: 7px; }
nav { display: flex; align-items: center; gap: 22px; }
nav a { color: var(--ink); text-decoration: none; font-size: 0.95rem; }
nav a:hover { color: var(--green); }
.nav-cta { background: var(--green); color: #fff !important; padding: 6px 16px; border-radius: 999px; }
.nav-cta:hover { background: var(--green-dark); }
.nav-links { display: flex; align-items: center; gap: 22px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.menu-btn { display: none; align-items: center; justify-content: center; width: 42px; height: 42px; padding: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink); cursor: pointer; }
.menu-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.menu-btn[aria-expanded="true"] { background: var(--green-soft); border-color: var(--green); }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2.5px solid var(--green); outline-offset: 2px; border-radius: 6px; }
[id] { scroll-margin-top: 76px; }
@media (max-width: 760px) {
  nav { gap: 10px; }
  .nav-links { display: none; }
  /* With JavaScript: a drop-down panel under the header. */
  .js .menu-btn { display: inline-flex; order: 2; }
  .js .nav-links.open {
    display: flex; flex-direction: column; align-items: stretch; gap: 0;
    position: absolute; top: 64px; left: 0; right: 0;
    background: var(--page); border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
    padding: 8px 20px 14px;
  }
  .js .nav-links.open a { padding: 12px 4px; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
  .js .nav-links.open a:last-child { border-bottom: 0; }
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 22px; border-radius: 10px;
  font-weight: 600; text-decoration: none; font-size: 1rem;
  transition: transform 0.12s ease, background 0.12s ease;
}
.btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-dark); color: #fff; }
.btn-ghost { border: 1.5px solid currentColor; color: var(--green); }

/* Hero */
.hero {
  background: radial-gradient(1200px 500px at 85% 10%, rgb(244 42 65 / 0.18), transparent 60%),
              linear-gradient(160deg, var(--hero-from), var(--hero-to));
  color: #eaf5f1;
  padding: 72px 0 84px;
}
.hero-inner { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.eyebrow { margin: 0 0 8px; color: #8fe0c6; font-weight: 600; letter-spacing: 0.02em; }
.hero h1 { margin: 0 0 18px; font-size: clamp(2.1rem, 4.6vw, 3.3rem); line-height: 1.25; color: #fff; }
.lead { margin: 0 0 28px; font-size: 1.12rem; color: #cfe6de; max-width: 34em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero .btn-primary { background: #fff; color: var(--green-dark); }
.hero .btn-primary:hover { background: #e3f4ef; }
.hero .btn-ghost { color: #fff; }
.meta { margin: 16px 0 0; font-size: 0.9rem; color: #a9cbbf; }
@media (max-width: 900px) {
  .hero { padding: 48px 0 56px; }
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
}

/* Typing demo */
.demo {
  background: #fdfefe; color: #17231f;
  border-radius: 14px; box-shadow: 0 24px 60px rgb(0 0 0 / 0.35);
  overflow: hidden; min-width: 0;
}
.demo-bar { display: flex; align-items: center; gap: 7px; padding: 10px 14px; background: #eef2f1; border-bottom: 1px solid #dfe6e3; }
.dot { width: 11px; height: 11px; border-radius: 50%; background: #cdd6d3; }
.dot:first-child { background: #f26b6b; } .dot:nth-child(2) { background: #f3c14b; } .dot:nth-child(3) { background: #59c46f; }
.demo-title { margin-left: 10px; font-size: 0.85rem; color: #5d6b66; }
.demo-body { position: relative; min-height: 230px; padding: 22px 24px 24px; }
.demo-text { margin: 0; font-size: 1.55rem; line-height: 1.8; min-height: 1.8em; word-break: break-word; }
.caret { display: inline-block; width: 2px; height: 1.15em; background: #17231f; vertical-align: -0.15em; margin-left: 1px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.typing { background: #e3f4ef; border-bottom: 2px solid var(--green); }

.cand {
  position: absolute; min-width: 150px;
  background: #fff; border: 1px solid #dde3e8; border-radius: 9px;
  box-shadow: 0 10px 26px rgb(0 0 0 / 0.16); padding: 4px; font-size: 1.05rem;
}
.cand-roman { font-family: var(--mono); font-size: 0.78rem; color: #66727f; padding: 2px 10px 4px; }
.cand-list { list-style: none; margin: 0; padding: 0; }
.cand-list li { padding: 1px 12px 3px; border-radius: 5px; line-height: 1.6; }
.cand-list li.sel { background: var(--green); color: #fff; }
.demo-keys { padding: 9px 16px; background: #f4f7f6; border-top: 1px solid #e3e9e7; font-family: var(--mono); font-size: 0.85rem; color: #5d6b66; min-height: 2.4em; }
.demo-keys span::before { content: "কিবোর্ডে: "; font-family: var(--font); }

/* Sections */
.section { padding: 80px 0; }
.section.alt { background: var(--page-alt); }
.section h2 { margin: 0 0 12px; font-size: clamp(1.6rem, 3vw, 2.1rem); line-height: 1.35; }
.section-lead { margin: 0 0 32px; color: var(--muted); }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 32px; }
@media (max-width: 900px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid { grid-template-columns: 1fr; } .section { padding: 56px 0; } }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 24px; }
.card h3 { margin: 0 0 8px; font-size: 1.15rem; }
.card p { margin: 0; color: var(--muted); }
.bn { font-weight: 600; color: var(--ink); }

/* Privacy */
.privacy { background: var(--green-soft); }
.privacy-inner { display: grid; grid-template-columns: auto 1fr; gap: 40px; align-items: start; }
.shield svg { width: 96px; height: 96px; fill: none; stroke: var(--green); stroke-width: 1.4; stroke-linejoin: round; stroke-linecap: round; }
.checks { list-style: none; margin: 16px 0 0; padding: 0; }
.checks li { position: relative; padding-left: 30px; margin-bottom: 10px; }
.checks li::before { content: ""; position: absolute; left: 4px; top: 0.55em; width: 14px; height: 8px; border-left: 2.5px solid var(--green); border-bottom: 2.5px solid var(--green); transform: rotate(-45deg); }
@media (max-width: 600px) { .privacy-inner { grid-template-columns: 1fr; gap: 12px; } .shield svg { width: 64px; height: 64px; } }

/* Downloads */
.downloads { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
@media (max-width: 760px) { .downloads { grid-template-columns: 1fr; } }
.dl-card { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 28px; }
.dl-main { border: 2px solid var(--green); box-shadow: var(--shadow); }
.dl-card h3 { margin: 0 0 6px; font-size: 1.35rem; }
.dl-card p { margin: 0 0 20px; color: var(--muted); }
.badge { position: absolute; top: -12px; right: 20px; background: var(--red); color: #fff; font-size: 0.8rem; font-weight: 600; padding: 2px 12px; border-radius: 999px; }
.file-info { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 20px 0 0; font-size: 0.88rem; }
.file-info dt { color: var(--muted); }
.file-info dd { margin: 0; min-width: 0; }
.hash { display: block; word-break: break-all; font-size: 0.75rem; line-height: 1.5; }
.note { margin-top: 28px; padding: 16px 20px; border-radius: 12px; background: var(--page-alt); border: 1px solid var(--line); font-size: 0.95rem; color: var(--muted); }
.note code { overflow-wrap: anywhere; }
.steps { counter-reset: step; list-style: none; padding: 0; margin: 32px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.steps li { counter-increment: step; position: relative; padding: 18px 18px 18px 64px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); }
.steps li::before { content: counter(step, bengali); position: absolute; left: 18px; top: 16px; width: 32px; height: 32px; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; font-weight: 700; }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr; } }

/* Guide */
.cheat { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 10px; }
.cheat div { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; display: flex; justify-content: space-between; align-items: baseline; }
.cheat code { background: none; padding: 0; color: var(--muted); }
.cheat span { font-size: 1.25rem; font-weight: 600; }
.examples { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; margin-top: 28px; }
.examples div { display: flex; gap: 12px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; }
.examples span:last-child { font-size: 1.2rem; }

/* FAQ */
.faq details { border-bottom: 1px solid var(--line); padding: 14px 0; }
.faq summary { cursor: pointer; font-weight: 600; font-size: 1.08rem; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--green); font-size: 1.4rem; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 10px 0 4px; color: var(--muted); }

/* Footer */
.foot { background: #0f2e25; color: #b6d0c7; padding: 40px 0; font-size: 0.92rem; }
.foot a { color: #8fe0c6; }
.foot .brand { color: #fff; margin-bottom: 12px; }
.foot p { margin: 4px 0; }

/* 404 page */
.notfound { min-height: calc(100vh - 64px - 104px); display: flex; align-items: center; }
.notfound .wrap { width: 100%; }
.notfound .lead { max-width: 30em; }
