/* Nur Alif — nuralif.uz
   Direction: "Type and nothing else" (tasteskill seed 1977352528), brand colours kept.
   One ground per chapter, General Sans for Latin text, Noto Naskh Arabic for Arabic only. */

@font-face {
  font-family: "Noto Naskh Arabic";
  src: url("fonts/NotoNaskhArabic-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF;
}

:root {
  /* brand */
  --purple: #5B2BD6;
  --lavender: #C7B8FF;      /* pale ink on purple; 4.3:1 there, used at display size only */
  --mist: #EFEAFF;          /* text on purple and the soft field */
  --night: #120A2A;         /* ink on paper, ground of the dark chapter */
  --paper: #FBFAFE;
  --paper-2: #F1EEFA;       /* one tone step down from paper */
  --ink: var(--night);
  --muted: #3A3550;         /* secondary notes only; 10:1 on paper */

  --font-text: "General Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-arabic: "Noto Naskh Arabic", "Geeza Pro", serif;

  --step-small: clamp(0.8125rem, 0.79rem + 0.1vw, 0.875rem);
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem);
  --step-head: clamp(2rem, 1.3rem + 3.2vw, 4rem);
  --step-display: clamp(4.6rem, 1rem + 13.4vw, 13.75rem);

  --margin: clamp(1rem, 3vw, 2.75rem);
  --gutter: clamp(1rem, 2vw, 2rem);
  --section: clamp(3rem, 7.5vw, 7.5rem);  /* each section pads with this, so two neighbours sit 96px (phone) to 240px apart */
  --pill: 999px;
  --shot: 28px;             /* app screenshots keep a phone's corner; everything else is square */

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft: cubic-bezier(0.33, 1, 0.68, 1);
  --ease-in-out: cubic-bezier(0.76, 0, 0.24, 1);
  --t-press: 140ms;
  --t-hover: 180ms;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font-text); font-size: var(--step-body); line-height: 1.5; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
h1, h2, h3, p, figure, blockquote, ul, ol, dl, dd { margin: 0; }
ul[class], ol[class] { padding: 0; list-style: none; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 3px solid var(--lavender); outline-offset: 3px; }
::selection { background: var(--purple); color: #fff; }
:target { scroll-margin-top: 5rem; }
h1, h2, h3 { font-weight: 700; text-wrap: balance; }
p { max-width: 62ch; text-wrap: pretty; }
.ar { font-family: var(--font-arabic); font-weight: 700; direction: rtl; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.wrap { padding-inline: var(--margin); }
.head { font-size: var(--step-head); line-height: 1.02; letter-spacing: -0.025em; }
.lead { font-size: var(--step-lead); line-height: 1.35; }
.small { font-size: var(--step-small); line-height: 1.45; }

/* ---------- controls ---------- */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 0.5em; min-height: 3.25rem; padding: 0 1.6rem; border-radius: var(--pill); background: var(--night); color: #fff; font-weight: 500; text-decoration: none; white-space: nowrap; transition: transform var(--t-press) var(--ease-out), background-color var(--t-hover) ease, color var(--t-hover) ease; }
.button:active { transform: scale(0.97); }
.button--light { background: #fff; color: var(--night); }
.button--purple { background: var(--purple); color: #fff; }
.link { text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 0.2em; text-decoration-thickness: 0.07em; transition: text-decoration-color var(--t-hover) ease; }
@media (hover: hover) and (pointer: fine) {
  .link:hover { text-decoration-color: currentColor; }
  .button:hover { background: var(--purple); color: #fff; }
  .button--light:hover { background: var(--mist); color: var(--night); }
  .button--purple:hover { background: #4A1FC0; }
}

/* ---------- header: just the wordmark, scrolls away with the page ---------- */
.bar { position: absolute; inset: 0 0 auto; z-index: 20; display: flex; align-items: center; height: 4.5rem; padding-inline: var(--margin); color: #fff; }
.bar__mark { display: inline-flex; align-items: center; gap: 0.6rem; font-weight: 700; font-size: var(--step-body); text-decoration: none; letter-spacing: -0.01em; }
.bar__mark img { width: 1.75rem; height: 1.75rem; border-radius: 0.45rem; background: none; }
.bar--doc { position: static; background: var(--purple); }

/* ---------- motion (content stays visible without script) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity 700ms var(--ease-out), transform 900ms var(--ease-out); transition-delay: calc(var(--i, 0) * 80ms); }
  .js [data-reveal].is-in { opacity: 1; transform: none; }
  .js .shutter[data-reveal] { opacity: 1; transform: none; clip-path: inset(0 0 100% 0); transition: clip-path 1100ms var(--ease-in-out); transition-delay: calc(var(--i, 0) * 80ms); }
  .js .shutter[data-reveal].is-in { clip-path: inset(0); }
}

/* ---------- document pages (privacy, support) ---------- */
.doc { padding: 4rem var(--margin) var(--section); display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); }
.doc__title { grid-column: 1 / -1; font-size: var(--step-head); line-height: 1.02; letter-spacing: -0.025em; margin-bottom: 1rem; }
.doc__date { grid-column: 1 / -1; font-size: var(--step-lead); line-height: 1.35; max-width: 44ch; margin-bottom: 4rem; }
.doc__body { grid-column: 1 / span 8; grid-row: 3; }
.doc__body h2 { font-size: var(--step-lead); line-height: 1.25; margin: 3rem 0 1rem; }
.doc__body h2:first-child { margin-top: 0; }
.doc__body p, .doc__body li { max-width: 70ch; }
.doc__body ul { padding-left: 1.2em; margin: 0.8em 0; }
.doc__body li + li { margin-top: 0.4em; }
.doc__lang { grid-column: 10 / -1; grid-row: 3; position: sticky; top: 6rem; align-self: start; display: flex; flex-direction: column; align-items: flex-end; gap: 0.5rem; font-weight: 500; text-align: right; }
.doc__lang a { text-decoration: none; }
.doc__lang a[aria-current] { color: var(--purple); }
.doc__section + .doc__section { margin-top: 6rem; }
.doc-foot { background: var(--purple); color: #fff; padding: 3rem var(--margin); display: flex; flex-wrap: wrap; gap: 1rem 2rem; justify-content: space-between; }
.doc-foot a { text-decoration: none; }
@media (max-width: 48em) {
  .doc__lang { grid-column: 1 / -1; grid-row: 3; position: static; flex-direction: row; align-items: center; margin-bottom: 2rem; }
  .doc__body { grid-column: 1 / -1; grid-row: 4; }
}
