/* July Bangla Keyboard website.
   Brand: logo blue and navy for the interface, July red and green for remembrance. */

@import url("fonts.css");

:root {
  --blue: #2563eb;
  --blue-600: #1d4fd8;
  --blue-soft: #eaf0ff;
  --navy: #1b1d4e;
  --navy-2: #2a2e72;
  --red: #f42a41;
  --green: #00a36c;
  --bg: #ffffff;
  --bg-alt: #f5f7fc;
  --text: #121429;
  --muted: #5d627a;
  --line: #e3e7f0;
  --card: #ffffff;
  --shadow: 0 1px 2px rgba(18, 20, 41, 0.05), 0 8px 24px -12px rgba(18, 20, 41, 0.18);
  --key: #ffffff;
  --key-fn: #c5c9d3;
  --key-text: #121429;
  --key-shadow: #9fa4b1;
  --kb-tray: #d6d9e0;
  --radius: 16px;
  --font: "Hind Siliguri", "Nirmala UI", "Noto Sans Bengali", system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --blue: #5b8cff;
    --blue-600: #4a7cf5;
    --blue-soft: #1b2546;
    --bg: #0d0f1c;
    --bg-alt: #121527;
    --text: #eef0f9;
    --muted: #a2a7bf;
    --line: #23283f;
    --card: #151930;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px -12px rgba(0, 0, 0, 0.6);
    --key: #5f6066;
    --key-fn: #3d3e44;
    --key-text: #ffffff;
    --key-shadow: #121214;
    --kb-tray: #26272c;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 3px; }
h1, h2, h3 { line-height: 1.3; margin: 0; font-weight: 700; }
p { margin: 0; }

kbd {
  display: inline-block;
  min-width: 1.7em;
  padding: 0 0.45em;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 6px;
  background: var(--card);
  color: var(--text);
  font: 600 0.8em/1.55 ui-monospace, "Cascadia Mono", Consolas, monospace;
  text-align: center;
  white-space: nowrap;
}

.wrap { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 16px; }
.wrap-narrow { max-width: 800px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--blue); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 50; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--blue) 60%, transparent); outline-offset: 2px; border-radius: 6px; }

/* ---------- Header ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; font-size: 18px; white-space: nowrap; margin-right: auto; }
.brand img { width: 34px; height: 34px; border-radius: 9px; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { color: var(--muted); text-decoration: none; font-weight: 500; padding: 6px 12px; border-radius: 9px; }
.nav a:hover { color: var(--text); background: var(--bg-alt); }
.nav a[aria-current="page"] { color: var(--text); }
.nav .btn { margin-left: 8px; color: #fff; padding: 8px 16px; }
.nav .btn:hover { background: var(--blue-600); color: #fff; }
.menu-btn { display: none; border: 1px solid var(--line); background: var(--card); color: var(--text); border-radius: 10px; width: 42px; height: 40px; cursor: pointer; }
.menu-btn svg { margin: auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 13px 22px;
  border-radius: 12px; border: 1px solid transparent;
  font: inherit; font-weight: 600; font-size: 17px; line-height: 1.2;
  text-decoration: none; cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.btn svg { flex: none; }
.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 8px 20px -8px color-mix(in srgb, var(--blue) 70%, transparent); }
.btn-primary:hover { background: var(--blue-600); transform: translateY(-1px); }
.btn-ghost { background: var(--card); color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: color-mix(in srgb, var(--blue) 40%, var(--line)); }
.btn-lg { padding: 16px 26px; font-size: 18px; }
.btn[aria-disabled="true"] { background: var(--bg-alt); color: var(--muted); box-shadow: none; cursor: default; border-color: var(--line); transform: none; }
.btn-sub { display: block; font-size: 13px; font-weight: 500; opacity: 0.85; margin-top: 2px; }
.btn-stack { flex-direction: column; align-items: flex-start; gap: 0; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 72px 0 80px; }
.hero::before {
  content: ""; position: absolute; inset: -40% -10% auto auto; width: 70%; height: 140%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--blue) 20%, transparent), transparent);
  pointer-events: none;
}
.hero-inner { position: relative; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 6px; border-radius: 999px; background: var(--blue-soft); color: var(--blue); font-size: 14px; font-weight: 600; }
.pill b { background: var(--blue); color: #fff; border-radius: 999px; padding: 1px 9px; font-weight: 600; }
.hero h1 { margin: 18px 0 16px; font-size: clamp(34px, 5.4vw, 58px); letter-spacing: -0.01em; }
.hero h1 em { font-style: normal; color: var(--blue); }
.hero .lead { color: var(--muted); font-size: clamp(17px, 2vw, 20px); max-width: 30em; }
.hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; margin-top: 30px; }
.other-link { color: var(--muted); font-weight: 500; text-decoration: none; }
.other-link:hover { color: var(--blue); }
.trust { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 26px 0 0; padding: 0; list-style: none; color: var(--muted); font-size: 15px; }
.trust li { display: flex; align-items: center; gap: 7px; }
.trust svg { color: var(--green); }

/* Demo window */
.demo { position: relative; }
.demo-window { background: var(--card); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 30px 70px -30px rgba(27, 29, 78, 0.45); overflow: hidden; }
.demo-bar { display: flex; align-items: center; gap: 7px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--bg-alt); }
.demo-bar i { width: 11px; height: 11px; border-radius: 50%; background: var(--line); }
.demo-bar span { margin-left: auto; font-size: 13px; color: var(--muted); }
.demo-text { min-height: 150px; padding: 26px 24px; font-size: clamp(22px, 2.6vw, 30px); font-weight: 500; line-height: 1.6; }
.demo-text .caret { display: inline-block; width: 2px; height: 1.05em; background: var(--blue); vertical-align: -0.15em; margin-left: 2px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.demo-keys { display: flex; gap: 6px; padding: 0 24px 24px; flex-wrap: wrap; min-height: 54px; }
.demo-keys kbd { font-size: 15px; min-width: 2.1em; transition: background 0.1s ease, color 0.1s ease; }
.demo-keys kbd.is-hit { background: var(--blue); color: #fff; border-color: var(--blue); }
.mode-chip { position: absolute; right: -10px; bottom: -18px; display: flex; align-items: center; gap: 10px; background: var(--navy); color: #fff; border-radius: 14px; padding: 10px 16px; box-shadow: 0 14px 30px -10px rgba(27, 29, 78, 0.6); font-weight: 600; }
.mode-chip img { width: 26px; height: 26px; border-radius: 7px; }
.mode-chip small { display: block; font-weight: 500; opacity: 0.75; font-size: 12px; line-height: 1.2; }

/* ---------- Stats ---------- */
.stats { border-block: 1px solid var(--line); background: var(--bg-alt); }
.stats-inner { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat { padding: 26px 16px; text-align: center; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat b { display: block; font-size: clamp(26px, 3.4vw, 36px); line-height: 1.2; color: var(--text); }
.stat span { color: var(--muted); font-size: 15px; }

/* ---------- Sections ---------- */
.section { padding: 96px 0; }
.section-alt { background: var(--bg-alt); }
.section-head { max-width: 640px; margin: 0 auto 48px; text-align: center; }
.eyebrow { display: block; margin-bottom: 10px; color: var(--blue); font-weight: 600; font-size: 15px; letter-spacing: 0.03em; }
.section-head h2 { font-size: clamp(28px, 3.8vw, 42px); }
.section-head p { margin-top: 12px; color: var(--muted); font-size: 18px; }

.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.feature { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.feature-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 13px; background: var(--blue-soft); color: var(--blue); margin-bottom: 18px; }
.feature h3 { font-size: 20px; margin-bottom: 6px; }
.feature p { color: var(--muted); font-size: 16px; }

/* ---------- Keyboard ---------- */
.kb-panel { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 22px; box-shadow: var(--shadow); }
.kb-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.seg { display: inline-flex; gap: 4px; padding: 4px; border-radius: 12px; background: var(--bg-alt); border: 1px solid var(--line); }
.seg button { font: inherit; font-size: 15px; font-weight: 600; border: 0; border-radius: 9px; padding: 6px 14px; background: transparent; color: var(--muted); cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--card); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12); }
.kb-tip { color: var(--muted); font-size: 14px; }

.kb { container-type: inline-size; background: var(--kb-tray); border-radius: 14px; padding: 10px; display: grid; gap: 7px; }
.kb-row { display: grid; grid-template-columns: repeat(60, minmax(0, 1fr)); gap: 6px; }
.kb-key {
  position: relative;
  height: clamp(34px, 5.6cqw, 60px);
  background: var(--key);
  color: var(--key-text);
  border-radius: clamp(4px, 0.7cqw, 8px);
  box-shadow: 0 1px 0 var(--key-shadow);
  transition: background 0.08s ease, transform 0.08s ease;
  user-select: none;
}
.kb-key .main { position: absolute; inset: 0; display: grid; place-items: center; font-size: clamp(13px, 2.5cqw, 26px); font-weight: 500; line-height: 1; }
.kb-key .shift { position: absolute; top: 9%; left: 9%; font-size: clamp(9px, 1.35cqw, 15px); color: var(--muted); line-height: 1; }
.kb-key .latin { position: absolute; bottom: 7%; right: 9%; font: 500 clamp(8px, 1.05cqw, 12px)/1 ui-monospace, Consolas, monospace; color: var(--muted); opacity: 0.85; text-transform: uppercase; }
.kb-key.is-unmapped .main { color: var(--muted); opacity: 0.55; font-size: clamp(11px, 1.8cqw, 18px); font-family: ui-monospace, Consolas, monospace; }
.kb-key.is-fn { background: var(--key-fn); }
.kb-key.is-fn .main { font: 500 clamp(9px, 1.35cqw, 14px)/1 var(--font); color: var(--key-text); opacity: 0.75; }
.kb-key.is-space .main { font-size: clamp(11px, 1.6cqw, 16px); opacity: 0.7; }
.kb-key.is-down { background: var(--blue); color: #fff; transform: translateY(1px); }
.kb-key.is-down .shift, .kb-key.is-down .latin, .kb-key.is-down .main { color: #fff; opacity: 1; }
.kb.show-shift .kb-key:not(.is-fn) .main { opacity: 0.25; }
.kb.show-shift .kb-key .shift { color: var(--blue); font-weight: 600; transform: scale(1.35); transform-origin: top left; }
@container (max-width: 560px) {
  .kb-key .latin { display: none; }
  .kb-row { gap: 3px; }
}
@container (max-width: 400px) {
  .kb-key .shift { top: 5%; left: 6%; }
}
.kb-note { margin-top: 14px; color: var(--muted); font-size: 14px; text-align: center; }

/* Typing examples */
.examples { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 36px; }
.example { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px 16px 14px; }
.example-out { font-size: 30px; font-weight: 600; color: var(--blue); line-height: 1.3; }
.example-keys { display: flex; flex-wrap: wrap; gap: 4px; margin: 8px 0 6px; }
.example-keys kbd { font-size: 13px; }
.example p { color: var(--muted); font-size: 14px; line-height: 1.5; }

/* ---------- Remembrance ---------- */
.memory { background: #0f1c18; color: #fff4e2; padding: 88px 0; overflow: hidden; }
.memory-inner { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.memory figure { margin: 0; }
.memory img { border-radius: 18px; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.6); }
.ribbon { display: grid; gap: 4px; width: 96px; margin-bottom: 26px; }
.ribbon i { height: 3px; border-radius: 3px; background: var(--red); }
.ribbon i + i { background: var(--green); }
.memory blockquote { margin: 0; font-size: clamp(26px, 3.4vw, 38px); font-weight: 700; line-height: 1.45; }
.memory .dedication { margin-top: 18px; color: #f6b3bb; font-weight: 600; font-size: 17px; }
.memory .text-link { display: inline-block; margin-top: 24px; color: #fff4e2; font-weight: 600; }

/* ---------- CTA band ---------- */
.cta-band { padding: 0 0 96px; }
.cta-card {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: center;
  padding: 44px 48px; border-radius: 24px; color: #fff;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 55%, #2f4bd0 100%);
  box-shadow: 0 30px 60px -30px rgba(27, 29, 78, 0.7);
}
.cta-card h2 { font-size: clamp(26px, 3.4vw, 36px); }
.cta-card p { margin-top: 8px; opacity: 0.8; }
.cta-card .btn-primary { background: #fff; color: var(--navy); box-shadow: none; }
.cta-card .btn-primary:hover { background: #eef2ff; }
.cta-card .btn[aria-disabled="true"] { background: rgba(255, 255, 255, 0.15); color: #fff; border-color: transparent; }

/* ---------- Download page ---------- */
.page-head { padding: 64px 0 36px; text-align: center; }
.page-head h1 { font-size: clamp(32px, 4.6vw, 48px); }
.page-head p { margin: 12px auto 0; max-width: 36em; color: var(--muted); font-size: 18px; }
.detected { display: inline-flex; align-items: center; gap: 8px; margin-top: 18px; padding: 6px 14px; border-radius: 999px; background: var(--blue-soft); color: var(--blue); font-weight: 600; font-size: 15px; }
.detected[hidden] { display: none; }

.platforms { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; padding-bottom: 32px; }
.platform { position: relative; display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 30px 28px; box-shadow: var(--shadow); }
.platform.is-yours { border: 2px solid var(--blue); padding: 29px 27px; }
.platform-badge { position: absolute; top: -13px; left: 24px; background: var(--blue); color: #fff; font-size: 13px; font-weight: 600; padding: 2px 12px; border-radius: 999px; }
.platform-icon { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 15px; background: var(--bg-alt); color: var(--text); margin-bottom: 18px; }
.platform h2 { font-size: 24px; }
.platform-meta { color: var(--muted); font-size: 15px; margin: 4px 0 18px; }
.platform ol { margin: 0 0 24px; padding-left: 1.2em; color: var(--muted); font-size: 16px; flex: 1; }
.platform ol li + li { margin-top: 4px; }
.platform .btn { width: 100%; }
.platform-soon { background: transparent; box-shadow: none; border-style: dashed; }
.platform-soon .soon-text { color: var(--muted); font-size: 16px; flex: 1; margin-bottom: 24px; }
.fineprint-box + .fineprint-box { margin-top: -72px; }
.fineprint-box { margin: 8px auto 96px; max-width: 760px; text-align: center; color: var(--muted); font-size: 15px; }

/* ---------- Article pages ---------- */
.article { padding: 0 0 96px; }
.article h2 { font-size: 26px; margin: 48px 0 14px; padding-top: 8px; }
.article h3 { font-size: 20px; margin: 28px 0 8px; }
.article p, .article li { color: var(--muted); font-size: 17px; }
.article p + p { margin-top: 12px; }
.article ul, .article ol { padding-left: 1.3em; margin: 12px 0 0; }
.article li + li { margin-top: 6px; }
.article strong { color: var(--text); }
.article .updated { color: var(--muted); font-size: 15px; text-align: center; }
.toc { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0 0 24px; }
.toc a { padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px; color: var(--text); text-decoration: none; font-size: 15px; font-weight: 500; background: var(--card); }
.toc a:hover { border-color: var(--blue); color: var(--blue); }
.callout { margin-top: 20px; padding: 18px 20px; border-radius: 14px; background: var(--blue-soft); color: var(--text); }
.callout p { color: var(--text); }
.table-wrap { overflow-x: auto; margin-top: 14px; }
.article table { width: 100%; border-collapse: collapse; font-size: 16px; }
.article th, .article td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.article th { color: var(--text); font-weight: 600; background: var(--bg-alt); }
.article td { color: var(--muted); }

.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 0 22px; }
.faq details + details { margin-top: 12px; }
.faq summary { cursor: pointer; padding: 18px 30px 18px 0; font-weight: 600; font-size: 18px; list-style: none; position: relative; color: var(--text); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 2px; top: 50%; width: 10px; height: 10px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: translateY(-70%) rotate(45deg); transition: transform 0.2s ease; }
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq details p { color: var(--muted); padding-bottom: 18px; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); background: var(--bg-alt); padding: 56px 0 32px; font-size: 15px; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(4, minmax(0, 1fr)); gap: 32px; }
.footer-brand .brand { margin: 0 0 12px; }
.footer-brand p { color: var(--muted); max-width: 22em; }
.footer h4 { margin: 0 0 12px; font-size: 15px; color: var(--text); }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li + li { margin-top: 8px; }
.footer a { color: var(--muted); text-decoration: none; }
.footer a:hover { color: var(--blue); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero-inner, .memory-inner { grid-template-columns: minmax(0, 1fr); gap: 48px; }
  .demo { max-width: 560px; }
  .features, .platforms { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .examples { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .menu-btn { display: grid; }
  .nav { position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 2px; padding: 10px 16px 16px; background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: 0 12px 24px -12px rgba(0, 0, 0, 0.2); display: none; }
  .nav.is-open { display: flex; }
  .nav a { padding: 10px 12px; }
  .nav .btn { margin: 6px 0 0; }
  .hero { padding: 40px 0 64px; }
  .stats-inner { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .section { padding: 72px 0; }
  .memory { padding: 64px 0; }
  .cta-card { grid-template-columns: minmax(0, 1fr); padding: 32px 24px; }
  .kb-panel { padding: 12px; border-radius: 16px; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .features, .platforms { grid-template-columns: minmax(0, 1fr); }
  .example-out { font-size: 26px; }
  .hero-cta .btn { width: 100%; }
  .mode-chip { right: 8px; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 20px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
