/* Baksho. Materials of the object: warm-chalk shell, charcoal tray, one orange
   button, a white-on-black pixel screen. One type family (Anek) throughout. */
:root {
  --paper: #e9e5de;
  --paper-2: #dfdad2;
  --ink: #131313;
  --ink-2: #3b3934;
  --mute: #6c685f;
  --rule: rgba(19, 19, 19, .16);
  --dark: #121314;
  --dark-2: #1c1d1f;
  --on-dark: #ece8e1;
  --on-dark-mute: #9c988f;
  --rule-dark: rgba(236, 232, 225, .16);
  --accent: #e3612a;
  --head-h: 64px;
  --wrap: 1280px;
  --font: "Anek", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--head-h) + 12px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 1.0625rem/1.6 var(--font); font-stretch: 100%;
  overflow-x: clip; text-rendering: optimizeLegibility;
}
html:lang(bn) body { line-height: 1.72; }
html.over-baksho body { cursor: grab; }
html.turning-baksho body { cursor: grabbing; user-select: none; -webkit-user-select: none; }
/* model areas: a sideways drag turns Baksho, a vertical swipe still scrolls, two fingers zoom */
.slot, .slot-box { touch-action: pan-y; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
p { margin: 0 0 1em; }
h1, h2, h3 { margin: 0; font-weight: 700; }
::selection { background: var(--ink); color: var(--paper); }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
@media (min-width: 900px) { .wrap { padding: 0 40px; } }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--ink); color: var(--paper); padding: 10px 14px; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* the travelling 3D model: drawn over the page, never catches clicks */
.stage { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 20; pointer-events: none; opacity: 0; transition: opacity .2s; }

/* ---------- header ---------- */
.site-head { position: fixed; inset: 0 0 auto; z-index: 40; height: var(--head-h); transition: background .25s, border-color .25s; border-bottom: 1px solid transparent; }
.site-head.is-scrolled { background: color-mix(in srgb, var(--paper) 86%, transparent); backdrop-filter: blur(12px); border-color: var(--rule); }
.head-row { height: 100%; display: flex; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; flex: none; }
.brand-wm { width: 68px; height: 26px; }
.brand-name { font-weight: 600; font-size: 1.05rem; letter-spacing: .01em; }
.nav { display: none; gap: 28px; margin-left: 28px; }
.nav a, .langs a { text-decoration: none; font-size: .8rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); }
html:lang(bn) .nav a { letter-spacing: .02em; font-size: .92rem; }
.nav a:hover, .langs a:hover { color: var(--ink); }
@media (min-width: 1040px) { .nav { display: flex; } }
.head-end { margin-left: auto; display: flex; align-items: center; gap: 18px; }
.langs { display: flex; gap: 12px; }
.langs a[lang="bn"] { letter-spacing: .02em; text-transform: none; font-size: .9rem; }
.langs a[aria-current="page"] { color: var(--ink); text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1.5px; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 50px; padding: 0 22px; border: 0; border-radius: 3px;
  font: 600 .95rem/1 var(--font); letter-spacing: .02em; text-decoration: none; cursor: pointer; transition: background .2s, color .2s, transform .2s; }
.btn:active { transform: translateY(1px); }
.btn-accent { background: var(--accent); color: var(--ink); }
.btn-accent:hover { background: #ef7038; }
.btn-ink { background: var(--ink); color: var(--paper); }
.btn-ink:hover { background: #2a2a28; }
.btn-line { box-shadow: inset 0 0 0 1.5px var(--ink); color: var(--ink); background: transparent; }
.btn-line:hover { background: var(--ink); color: var(--paper); }
.btn-ghost-light { box-shadow: inset 0 0 0 1.5px var(--rule-dark); color: var(--on-dark); background: transparent; }
.btn-ghost-light:hover { box-shadow: inset 0 0 0 1.5px var(--on-dark); }
.btn-sm { min-height: 38px; padding: 0 14px; font-size: .82rem; }
.btn[disabled] { opacity: .55; cursor: progress; }
.head-end .btn { display: none; }
@media (min-width: 640px) { .head-end .btn { display: inline-flex; } }

/* ---------- type ---------- */
.tag, .label { display: flex; align-items: center; gap: 12px; margin: 0 0 22px; font-size: .74rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--mute); }
html:lang(bn) .tag, html:lang(bn) .label { letter-spacing: .03em; font-size: .88rem; }
.label span { border: 1px solid currentColor; padding: 3px 6px 2px; letter-spacing: .08em; font-size: .7rem; line-height: 1; }
.led { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.display { font-size: clamp(2.9rem, 6.6vw, 6.4rem); font-stretch: 75%; line-height: .9; letter-spacing: -.018em; max-width: 11ch; }
html:lang(bn) .display { font-stretch: 82%; line-height: 1.08; letter-spacing: 0; max-width: none; font-size: clamp(3.7rem, 7.6vw, 7.2rem); }
.h2 { font-size: clamp(2.2rem, 4.6vw, 4.1rem); font-stretch: 75%; line-height: .96; letter-spacing: -.012em; max-width: 14ch; margin-bottom: 26px; }
html:lang(bn) .h2 { font-stretch: 85%; line-height: 1.2; letter-spacing: 0; font-size: clamp(2rem, 4vw, 3.4rem); }
.lead { font-size: clamp(1.1rem, 1.5vw, 1.3rem); color: var(--ink-2); max-width: 36em; margin: 28px 0 0; }
.body { font-size: 1.12rem; color: var(--ink-2); max-width: 34em; }
.hint, .fine { font-size: .9rem; color: var(--mute); }

/* ---------- tagline ---------- */
.motto { margin: 26px 0 0; padding-left: 16px; border-left: 3px solid var(--accent); display: flex; flex-direction: column; gap: 4px; }
.motto-bn { font-size: clamp(1.25rem, 2.1vw, 1.7rem); font-weight: 600; font-stretch: 90%; line-height: 1.35; color: var(--ink); }
.motto-gloss { font-size: .92rem; color: var(--mute); }
.motto-gloss:empty { display: none; }
.foot-motto { font-weight: 600; color: var(--ink); font-size: 1.05rem; }

/* ---------- hero ---------- */
.hero { position: relative; min-height: 100svh; padding-top: var(--head-h); overflow: hidden; display: flex; flex-direction: column; }
.hero-grid { flex: 1; display: grid; gap: 24px; align-items: center; padding-top: 24px; padding-bottom: calc(13vw + 24px); }
.hero-copy { position: relative; z-index: 2; }
.hero-slot { position: relative; height: 46svh; order: -1; }
.poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; transition: opacity .6s; }
html.has-3d .poster { opacity: 0; }
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 1.05fr 1fr; gap: 40px; padding-bottom: calc(13vw + 16px); }
  .hero-slot { order: 0; height: min(76svh, 760px); }
}
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 34px 0 40px; }
.readouts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; border-top: 1px solid var(--rule); max-width: 560px; }
.readouts div { padding: 14px 14px 0 0; }
.readouts div + div { padding-left: 14px; border-left: 1px solid var(--rule); }
.readouts dt { font-size: .7rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--mute); }
html:lang(bn) .readouts dt { letter-spacing: .03em; font-size: .82rem; }
.readouts dd { margin: 4px 0 0; font-weight: 600; font-size: .98rem; line-height: 1.3; }
.hero-word { position: absolute; left: 0; right: 0; bottom: 0; height: 13vw; overflow: hidden; color: var(--ink); opacity: .07; pointer-events: none; }
.hero-word svg { width: 100%; height: auto; aspect-ratio: 8.2845 / 3.1; }

/* ---------- sections ---------- */
.sec { position: relative; padding: clamp(84px, 11vw, 150px) 0; }
.sec-dark { background: var(--dark); color: var(--on-dark); }
.sec-dark .body, .sec-dark .lead { color: #c9c5bd; }
.sec-dark .label, .sec-dark .hint, .sec-dark .fine { color: var(--on-dark-mute); }
.sec-alt { background: var(--paper-2); }
.sec-head { margin-bottom: 40px; }

.split { display: grid; gap: 28px; }
.sticky-slot { position: sticky; top: var(--head-h); height: 40svh; z-index: 3; display: grid; place-items: center; order: -1; margin: 0 -20px; background: inherit; }
.sec-dark .sticky-slot { background: var(--dark); }
.sec-alt .sticky-slot { background: var(--paper-2); }
#senses .sticky-slot { background: var(--paper); border-bottom: 1px solid var(--rule); }
.slot-box { width: 100%; height: 100%; display: grid; place-items: center; }
.meter-float { position: absolute; bottom: 10px; left: 20px; font-size: .74rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--mute); }
.meter-float .meter-v { color: var(--ink); }
@media (min-width: 900px) {
  .split { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 40px; align-items: start; }
  .split > .copy { grid-column: 1 / span 6; }
  .split > .sticky-slot { grid-column: 7 / span 6; order: 0; height: calc(100svh - var(--head-h)); margin: 0; background: transparent !important; border: 0 !important; }
  .slot-box { height: 76%; }
  .meter-float { bottom: 12%; left: 50%; transform: translateX(-50%); }
}

.ticks { list-style: none; margin: 30px 0 34px; padding: 0; border-top: 1px solid var(--rule-dark); max-width: 30em; }
.ticks li { padding: 13px 0 12px 28px; border-bottom: 1px solid var(--rule-dark); position: relative; }
.ticks li::before { content: ""; position: absolute; left: 2px; top: 1.15em; width: 10px; height: 10px; background: var(--on-dark); }
.meter { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.meter-k { font-size: .72rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--on-dark-mute); }
.meter-v { font-weight: 700; font-size: 1.25rem; font-stretch: 80%; min-width: 7ch; }

/* reactions */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: s; }
.step { min-height: 40svh; padding: 28px 0 40px; border-top: 1px solid var(--rule); opacity: .32; transition: opacity .35s; }
.step.is-on { opacity: 1; }
.step-n { display: inline-block; font-size: .72rem; font-weight: 600; letter-spacing: .12em; color: var(--mute); border: 1px solid currentColor; padding: 3px 6px 2px; margin-bottom: 18px; }
.step h3 { font-size: clamp(1.7rem, 3vw, 2.5rem); font-stretch: 78%; line-height: 1; margin-bottom: 14px; }
.step p { font-size: 1.1rem; color: var(--ink-2); max-width: 30em; margin: 0; }
@media (min-width: 900px) { .step { min-height: 62svh; padding-top: 34px; } }

/* apps: tiles become a lit OLED on hover */
.apps { list-style: none; margin: 0 0 18px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); border-top: 1px solid var(--rule); border-left: 1px solid var(--rule); }
.app { display: flex; flex-direction: column; gap: 4px; padding: 18px 16px 16px; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); cursor: default; transition: background .15s, color .15s; outline-offset: -3px; }
.app .px { width: 36px; height: 36px; fill: var(--ink); margin-bottom: 14px; transition: fill .15s; }
.app-t { font-weight: 700; font-size: 1.1rem; line-height: 1.15; }
.app-d { font-size: .88rem; color: var(--mute); line-height: 1.35; }
.app:hover, .app:focus-visible { background: #000; color: #fff; }
.app:hover .px, .app:focus-visible .px { fill: #fff; }
.app:hover .app-d, .app:focus-visible .app-d { color: #b8b8b8; }

/* object */
.object-grid { display: grid; gap: 28px; }
.object-slot { height: 52svh; }
.dims { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; border-top: 1px solid var(--rule-dark); }
.dims div { padding: 14px 10px 0 0; }
.dims div + div { padding-left: 14px; border-left: 1px solid var(--rule-dark); }
.dims dt { font-size: .7rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--on-dark-mute); }
html:lang(bn) .dims dt { letter-spacing: .03em; font-size: .85rem; }
.dims dd { margin: 0; font-size: clamp(2.6rem, 6vw, 5.2rem); font-weight: 700; font-stretch: 75%; line-height: 1.05; }
.dims small { font-size: .9rem; font-weight: 600; font-stretch: 100%; margin-left: 6px; color: var(--on-dark-mute); }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { border: 1px solid var(--rule-dark); padding: 7px 12px 6px; font-size: .9rem; border-radius: 2px; }
@media (min-width: 900px) {
  .object-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); grid-template-rows: auto minmax(52svh, 1fr) auto; column-gap: 40px; row-gap: 10px; min-height: 100svh; }
  .object-copy { grid-column: 1 / span 6; grid-row: 1; }
  .object-slot { grid-column: 3 / span 8; grid-row: 2; height: auto; min-height: 52svh; }
  .dims { grid-column: 7 / span 6; grid-row: 3; align-self: end; }
  .chips { grid-column: 1 / span 6; grid-row: 3; align-self: end; }
}

/* specs + faq */
.narrow-grid { display: grid; gap: 10px; }
@media (min-width: 900px) { .narrow-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 40px; } .narrow-grid > :first-child { grid-column: 1 / span 4; } .narrow-grid > :last-child { grid-column: 5 / span 8; } }
.spec-table { margin: 0 0 18px; border-top: 1px solid var(--rule); }
.spec-table div { display: grid; grid-template-columns: minmax(110px, 1fr) 2fr; gap: 16px; padding: 16px 0 15px; border-bottom: 1px solid var(--rule); }
.spec-table dt { font-size: .74rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--mute); padding-top: .2em; }
html:lang(bn) .spec-table dt { letter-spacing: .03em; font-size: .9rem; }
.spec-table dd { margin: 0; font-weight: 500; font-size: 1.1rem; }
.slot-quiet { position: absolute; left: 0; right: 0; top: 50%; height: 1px; }
.faq { border-top: 1px solid var(--rule); }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 20px; padding: 22px 0; font-size: clamp(1.15rem, 1.8vw, 1.4rem); font-weight: 600; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-weight: 400; font-size: 1.6rem; line-height: .9; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 24px; max-width: 40em; color: var(--ink-2); font-size: 1.08rem; }

/* join */
.form { display: flex; flex-wrap: wrap; gap: 10px; margin: 34px 0 14px; max-width: 560px; }
.form input[type="email"] { flex: 1 1 260px; min-width: 0; min-height: 52px; padding: 0 16px; border-radius: 3px; border: 1px solid var(--rule-dark); background: var(--dark-2); color: var(--on-dark); font: 400 1.05rem var(--font); }
.form input[type="email"]::placeholder { color: #7d7a73; }
.form input[type="email"]:focus { outline: none; border-color: var(--on-dark); }
.form .btn { min-height: 52px; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-status { min-height: 1.6em; font-weight: 600; }
.form-status.ok { color: #8fd6a2; }
.form-status.err { color: #ff967e; }

/* footer */
.site-foot { padding: 64px 0 40px; border-top: 1px solid var(--rule); }
.foot-word { color: var(--ink); margin-bottom: 36px; }
.foot-word svg { width: 100%; height: auto; aspect-ratio: 8.2845 / 3.1; }
.foot-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 32px; color: var(--mute); font-size: .92rem; }
.foot-row p { margin: 0; }
.foot-row p:last-child { margin-left: auto; }
.langs-foot a { text-transform: none; letter-spacing: 0; font-size: .92rem; font-weight: 500; }

/* viewer controls (under the model in the hero and Object sections) */
.viewer-ui { position: absolute; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; align-items: center; gap: 10px; z-index: 25; opacity: 0; transition: opacity .4s; }
html.has-3d .viewer-ui { opacity: 1; }
html.no-3d .viewer-ui { display: none; }
.viewer-hint { margin: 0; font-size: .74rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--mute); text-align: center; }
html:lang(bn) .viewer-hint { letter-spacing: .02em; text-transform: none; font-size: .86rem; }
.hint-touch { display: none; }
@media (hover: none), (pointer: coarse) { .hint-touch { display: inline; } .hint-mouse { display: none; } }
.viewer-btns { display: flex; gap: 6px; }
.viewer-btns button { width: 38px; height: 38px; display: grid; place-items: center; padding: 0; border: 1px solid var(--rule); border-radius: 3px; background: color-mix(in srgb, var(--paper) 80%, transparent); color: var(--ink); cursor: pointer; transition: background .15s, color .15s; }
.viewer-btns button:hover { background: var(--ink); color: var(--paper); }
.viewer-btns svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.sec-dark .viewer-hint { color: var(--on-dark-mute); }
.sec-dark .viewer-btns button { border-color: var(--rule-dark); background: color-mix(in srgb, var(--dark) 80%, transparent); color: var(--on-dark); }
.sec-dark .viewer-btns button:hover { background: var(--on-dark); color: var(--dark); }
.object-slot { position: relative; }

/* without WebGL: a flat pixel screen stands in for the model */
.screen2d { display: none; width: min(78%, 520px); padding: 4.5%; background: #0b0b0b; border-radius: 14px; box-shadow: inset 0 0 0 2px #2a2a2a; }
.screen2d canvas { display: block; width: 100%; height: auto; aspect-ratio: 2 / 1; image-rendering: pixelated; background: #000; }
html.no-3d .screen2d { display: block; }
html.no-3d .stage { display: none; }

/* reveal on scroll */
.will-reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1); }
.will-reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .will-reveal { opacity: 1; transform: none; transition: none; } }
