/* jonaki.itkhamar.com: the app's own night, firefly amber and Baloo faces.
   Nothing loads from elsewhere and there is no script (see ../.htaccess). */

@font-face { font-family: "Baloo Da 2"; font-weight: 400; font-display: swap; src: url("fonts/baloo-da-2-400.woff") format("woff"); }
@font-face { font-family: "Baloo Da 2"; font-weight: 600; font-display: swap; src: url("fonts/baloo-da-2-600.woff") format("woff"); }
@font-face { font-family: "Baloo Da 2"; font-weight: 800; font-display: swap; src: url("fonts/baloo-da-2-800.woff") format("woff"); }
@font-face { font-family: "Baloo Bhaijaan 2"; font-weight: 700; font-display: swap; src: url("fonts/baloo-bhaijaan-2-700.woff") format("woff"); }

:root {
  color-scheme: dark;
  --night: #1A1B3A;        /* JonakiColors.night */
  --night-deep: #12132B;   /* nightDeep */
  --night-raised: #22244D; /* nightRaised */
  --night-lift: #2A2D5C;   /* nightLift */
  --glow: #FFB84D;         /* glow */
  --glow-pale: #FFF0C2;    /* glowPale */
  --cream: #FFF6E5;        /* cream */
  --muted: #B9B8CF;
  --faint: #6E6C96;
  --line: #34376A;
  --face: "Baloo Da 2", "Noto Sans Bengali", system-ui, sans-serif;
  --arabic: "Baloo Bhaijaan 2", "Noto Naskh Arabic", serif;
  --measure: 40rem;
}

* { box-sizing: border-box; }
html { background: var(--night-deep); }
body {
  margin: 0; min-height: 100vh;
  background: radial-gradient(120% 60rem at 70% -10rem, var(--night-raised), var(--night) 55%, var(--night-deep));
  color: var(--cream); font: 400 1.0625rem/1.75 var(--face);
  -webkit-text-size-adjust: 100%;
}
img { max-width: 100%; display: block; }
a { color: var(--glow); text-decoration-thickness: 1px; text-underline-offset: .2em; }
a:hover { color: var(--glow-pale); }
:focus-visible { outline: 2px solid var(--glow); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-weight: 800; line-height: 1.2; margin: 0; text-wrap: balance; }
p, ul, ol { margin: 0; }
[lang="en"].sub, .en { color: var(--muted); }
.ar { font-family: var(--arabic); }

.page { max-width: 68rem; margin: 0 auto; padding: 0 max(1rem, env(safe-area-inset-left)); }

/* top bar */
.bar { display: flex; align-items: center; justify-content: space-between; gap: .5rem 1.5rem; flex-wrap: wrap; padding: 1.25rem 0; }
.brand { display: inline-flex; align-items: center; gap: .6rem; color: var(--cream); text-decoration: none; font-weight: 800; font-size: 1.2rem; }
.brand svg { width: 3.1rem; height: 2.85rem; flex: none; }
.bar nav { display: flex; gap: .25rem 1.25rem; flex-wrap: wrap; }
.bar nav a { color: var(--muted); text-decoration: none; font-weight: 600; padding: .35rem 0; }
.bar nav a:hover, .bar nav a[aria-current="page"] { color: var(--cream); }
.bar nav a[aria-current="page"] { box-shadow: inset 0 -2px var(--glow); }

/* hero */
.hero { padding: clamp(2rem, 7vw, 5rem) 0 0; }
.hero h1 {
  font-size: clamp(4.5rem, 17vw, 10rem); line-height: 1; letter-spacing: -.01em;
  color: var(--glow); text-shadow: 0 0 .35em rgb(255 184 77 / .35);
}
.hero .latin { display: block; font-size: clamp(1.4rem, 3.5vw, 2rem); color: var(--cream); text-shadow: none; letter-spacing: .02em; margin-top: .4rem; }
.hero .lede { max-width: 34rem; font-size: clamp(1.15rem, 2.4vw, 1.4rem); line-height: 1.6; margin-top: 1.75rem; }
.hero .lede + .lede { font-size: 1.05rem; margin-top: .6rem; }
.status { display: inline-block; margin-top: 1.75rem; padding: .5rem 1.1rem; border-radius: 1.4rem; background: var(--night-lift); font-weight: 600; }
.status::before { content: ""; display: inline-block; vertical-align: .1em; margin-right: .6rem; width: .6rem; height: .6rem; border-radius: 50%; background: var(--glow); box-shadow: 0 0 .6rem var(--glow); }
.status .en { margin-left: .4rem; }

/* the trail of light: the app's course map, lit letter by letter */
.trail { display: block; width: 100%; height: clamp(8rem, 24vw, 15rem); margin: clamp(1.5rem, 5vw, 3rem) 0 0; overflow: hidden; }
.trail .path { fill: none; stroke: var(--faint); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 0 14; }
.trail .node circle.disc { fill: var(--night-raised); stroke: var(--line); stroke-width: 3; }
.trail .node text { font-family: var(--face); font-weight: 800; font-size: 42px; fill: var(--faint); text-anchor: middle; dominant-baseline: central; }
.trail .node text.ar { font-family: var(--arabic); font-weight: 700; }
.trail .node .halo { fill: url(#halo); opacity: 0; }
.trail .lit circle.disc { animation: disc-on .6s ease-out both; animation-delay: var(--at); }
.trail .lit text { animation: text-on .6s ease-out both; animation-delay: var(--at); }
.trail .lit .halo { animation: halo-on 1.2s ease-out both; animation-delay: var(--at); }
@keyframes disc-on { to { fill: var(--glow); stroke: var(--glow-pale); } }
@keyframes text-on { to { fill: var(--night); } }
@keyframes halo-on { to { opacity: 1; } }

/* sections */
.band { padding: clamp(3.5rem, 9vw, 6rem) 0 0; }
.band > header { max-width: var(--measure); margin-bottom: 1.75rem; }
.band h2 { font-size: clamp(1.75rem, 4vw, 2.4rem); }
.band h2 .en { display: block; font-size: 1.05rem; font-weight: 600; margin-top: .35rem; }

/* a lesson, step by step: the hero's trail again, its discs numbered the way
   the app numbers a letter's strokes, each screen sitting in its own glow */
.steps { list-style: none; padding: 0; margin: 0; position: relative;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.5rem clamp(1.5rem, 4vw, 3.5rem); }
.steps::before { content: ""; position: absolute; top: 1.5rem; left: 16.67%; right: 16.67%; border-top: 3px dotted var(--faint); }
.step { position: relative; display: grid; grid-template-rows: auto auto 1fr; justify-items: center; text-align: center; gap: 1.75rem; }
.step .num { position: relative; z-index: 1; width: 3rem; height: 3rem; border-radius: 50%; display: grid; place-items: center;
  background: var(--glow); color: var(--night); font-weight: 800; font-size: 1.4rem; line-height: 1;
  box-shadow: 0 0 0 6px var(--night), 0 0 1.5rem rgb(255 184 77 / .6); }
.step .screen { position: relative; width: min(100%, 14.5rem); }
.step .screen::before { content: ""; position: absolute; inset: -14% -40%; background: radial-gradient(closest-side, rgb(255 184 77 / .2), transparent); }
.step img { position: relative; width: 100%; height: auto; border-radius: 1.5rem; box-shadow: 0 0 0 1px rgb(255 240 194 / .14); }
.step .say { display: grid; gap: .5rem; max-width: 19rem; }
.step h3 { font-size: 1.35rem; }
.step h3 .en, .step p .en { display: block; }
.step h3 .en { font-size: 1rem; font-weight: 600; margin-top: .15rem; }
.step p { line-height: 1.6; }
.step p .en { font-size: .95rem; margin-top: .3rem; }

@media (max-width: 46rem) {
  .steps { grid-template-columns: minmax(0, 1fr); gap: 3rem; }
  .steps::before { top: 1.5rem; bottom: 2rem; left: 1.5rem; right: auto; border-top: 0; border-left: 3px dotted var(--faint); }
  .step { grid-template-columns: 3rem minmax(0, 1fr); grid-template-rows: auto; justify-items: start; text-align: left; gap: 1.25rem 1.25rem; }
  .step .num { grid-row: 1 / span 2; align-self: start; }
  .step .screen, .step .say { grid-column: 2; }
  .step .screen { width: min(100%, 13rem); }
}

.pairs { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); gap: 1.5rem 3rem; }
.pairs li { padding-left: 1.4rem; position: relative; line-height: 1.55; }
.pairs li::before { content: ""; position: absolute; left: 0; top: .55em; width: .55rem; height: .55rem; border-radius: 50%; background: var(--glow); box-shadow: 0 0 .5rem rgb(255 184 77 / .6); }
.pairs .en { display: block; font-size: .95rem; margin-top: .15rem; }

/* releases: the same trail, run downwards; newest at the top */
.releases { list-style: none; padding: 0 0 0 2.25rem; position: relative; max-width: var(--measure); }
.releases::before { content: ""; position: absolute; left: .55rem; top: .8rem; bottom: 0; border-left: 3px dotted var(--faint); }
.release { position: relative; padding-bottom: 3rem; }
.release::before { content: ""; position: absolute; left: -2.25rem; top: .45rem; width: 1.4rem; height: 1.4rem; border-radius: 50%;
  background: var(--glow); box-shadow: 0 0 0 4px var(--night), 0 0 1.25rem rgb(255 184 77 / .55); }
.release.upcoming::before { background: var(--night-raised); border: 3px solid var(--glow); box-shadow: 0 0 0 4px var(--night); }
.release h3 { font-size: 1.6rem; }
.release h3 .en { font-size: 1.05rem; font-weight: 600; margin-left: .4rem; }
.release time, .release .when { display: block; color: var(--muted); font-weight: 600; margin: .15rem 0 1rem; }
.release .pairs { grid-template-columns: 1fr; gap: 1rem; }
.more { display: inline-block; margin-top: .5rem; font-weight: 600; }

/* reading pages (privacy) */
.prose { max-width: var(--measure); padding-top: clamp(1.5rem, 5vw, 3rem); }
.prose h1 { font-size: clamp(2.2rem, 6vw, 3.2rem); color: var(--glow); }
.prose h1 .en { display: block; font-size: 1.2rem; font-weight: 600; color: var(--muted); margin-top: .3rem; }
.prose .date { color: var(--muted); margin: 1rem 0 0; }
.prose section { margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line); display: grid; gap: .75rem; }
.prose h2 { font-size: 1.35rem; color: var(--glow-pale); }
.prose h2 .en { font-size: 1rem; font-weight: 600; color: var(--muted); margin-left: .35rem; }
.prose ul { padding-left: 1.25rem; display: grid; gap: .5rem; }
.prose li .en { display: block; }
.prose .en { font-size: .98rem; }

/* footer */
.foot { margin-top: clamp(4rem, 10vw, 7rem); padding: 2rem 0 max(2.5rem, env(safe-area-inset-bottom)); border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 1rem 2.5rem; justify-content: space-between; color: var(--muted); font-size: .95rem; }
.foot nav { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; }
.foot b { color: var(--cream); font-weight: 600; }

@media (prefers-reduced-motion: reduce) {
  .trail .lit circle.disc, .trail .lit text, .trail .lit .halo { animation-duration: 1ms; animation-delay: 0s; }
}
.band > header .intro { margin-top: .75rem; }
.trail .at0 { --at: .5s; } .trail .at1 { --at: 1.1s; } .trail .at2 { --at: 1.7s; }
