/* ============================================================================
   SAIR — site styles
   Direction: Uzbek majolica tilework. A girih (khatam) star lattice drawn in
   line, over deep indigo, with the app's own electric blue as the glaze.
   Everything except the lattice stays quiet.
   ========================================================================== */

:root {
  /* Palette ---------------------------------------------------------------
     ink/ink-2  deep indigo, the night ground behind a tiled facade
     lapis      the app's own primary (#016AFF) — the live accent
     turquoise  majolica turquoise — the lattice line
     ochre      mosaic gold — the single warm note, used sparingly
     plaster    cool off-white for documents (never cream)                  */
  --ink: #08122b;
  --ink-2: #0e2050;
  --ink-3: #142a63;
  --lapis: #016aff;
  --lapis-lit: #3d8cff;
  --turquoise: #35d6d0;
  --ochre: #e9a93c;
  --plaster: #f5f7fc;
  --plaster-2: #e9edf7;
  --slate: #48536b;
  --slate-dim: #6b7691;
  --line: #d5dcec;

  --shell: min(1160px, calc(100vw - 3rem));

  --f-display: "Syne", "Trebuchet MS", sans-serif;
  --f-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --step-hero: clamp(2.05rem, 5.4vw, 4.15rem);
  --step-h2: clamp(1.75rem, 3.4vw, 2.65rem);
  --step-h3: clamp(1.05rem, 1.5vw, 1.2rem);
  --step-body: clamp(1rem, 1.05vw, 1.075rem);

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--plaster);
  color: var(--slate);
  font-family: var(--f-body);
  font-size: var(--step-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--lapis);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

:focus-visible {
  outline: 2px solid var(--ochre);
  outline-offset: 3px;
  border-radius: 2px;
}

.shell {
  width: var(--shell);
  margin-inline: auto;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ochre);
  color: var(--ink);
  padding: 0.6rem 1rem;
  z-index: 99;
  font-weight: 600;
}
.skip:focus {
  left: 1rem;
  top: 1rem;
}

/* --- Language switching ---------------------------------------------------
   Both languages ship in the markup; the <html data-lang> attribute decides
   which is painted. No layout shift, no fetch, and the page is readable with
   JS off (English shows by default).                                       */
/* Scoped under body on purpose: the <html> element itself carries lang, and an
   unscoped [lang="uz"] would match it and hide the entire document. */
body [lang="uz"] {
  display: none;
}
html[data-lang="uz"] body [lang="uz"] {
  display: revert;
}
html[data-lang="uz"] body [lang="en"] {
  display: none;
}

/* ==========================================================================
   Type
   ========================================================================== */

h1,
h2,
h3 {
  font-family: var(--f-display);
  color: var(--ink);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.08;
  margin: 0;
  text-wrap: balance;
}

.eyebrow {
  font-family: var(--f-body);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--slate-dim);
  margin: 0 0 1.1rem;
}

/* ==========================================================================
   Header
   ========================================================================== */

.masthead {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--ink) 88%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(53, 214, 208, 0.16);
}

.masthead__inner {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  height: 64px;
}

.wordmark {
  display: block;
  width: 92px;
  height: 19px;
  background-color: #fff;
  -webkit-mask: url("../img/wordmark.png") no-repeat center / contain;
  mask: url("../img/wordmark.png") no-repeat center / contain;
  flex: none;
}
.wordmark--ink {
  background-color: var(--ink);
}

.masthead__nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 1.6rem;
}

.masthead__nav a {
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s var(--ease);
}
.masthead__nav a:hover {
  color: #fff;
}

/* Language toggle: two glazed tiles, one lit. */
.langswitch {
  display: inline-flex;
  border: 1px solid rgba(53, 214, 208, 0.3);
  border-radius: 999px;
  overflow: hidden;
  flex: none;
}

.langswitch button {
  appearance: none;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.6);
  font: 600 0.72rem/1 var(--f-body);
  letter-spacing: 0.08em;
  padding: 0.44rem 0.7rem;
  cursor: pointer;
  transition:
    background 0.2s var(--ease),
    color 0.2s var(--ease);
}
.langswitch button[aria-pressed="true"] {
  background: var(--lapis);
  color: #fff;
}

/* ==========================================================================
   The lattice — this page's signature
   ========================================================================== */

.lattice {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  color: var(--turquoise);
}

.lattice path {
  fill: none;
  stroke: currentColor;
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

/* The wall tiles itself in: every star traces at once, then the glazed few
   catch the light. */
@keyframes tile-in {
  from {
    stroke-dashoffset: 240;
    opacity: 0;
  }
  to {
    stroke-dashoffset: 0;
    opacity: 1;
  }
}

@keyframes glaze {
  0%,
  100% {
    opacity: 0.07;
  }
  50% {
    opacity: 0.2;
  }
}

.lattice__pattern path {
  stroke-dasharray: 240;
  animation: tile-in 2.6s var(--ease) both;
}

.glazed {
  animation: glaze 9s ease-in-out infinite;
}
.glazed:nth-of-type(2) {
  animation-delay: -3s;
}
.glazed:nth-of-type(3) {
  animation-delay: -6s;
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  position: relative;
  background: var(--ink);
  color: #fff;
  overflow: hidden;
  isolation: isolate;
}

.hero__glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      70% 60% at 78% 18%,
      rgba(1, 106, 255, 0.5) 0%,
      transparent 62%
    ),
    radial-gradient(
      55% 55% at 8% 92%,
      rgba(53, 214, 208, 0.22) 0%,
      transparent 65%
    );
  pointer-events: none;
}

.hero__inner {
  position: relative;
  z-index: 2;
  padding: clamp(4.5rem, 10vw, 7.5rem) 0 clamp(4rem, 8vw, 6rem);
  max-width: 41rem;
}

.hero .eyebrow {
  color: var(--turquoise);
}

.hero h1 {
  font-size: var(--step-hero);
  overflow-wrap: break-word;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.035em;
}

.hero h1 em {
  font-style: normal;
  color: var(--turquoise);
}

.hero__lede {
  margin: 1.5rem 0 0;
  font-size: clamp(1.05rem, 1.6vw, 1.22rem);
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.76);
  max-width: 34rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 2.4rem;
  align-items: center;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.85rem 1.5rem;
  border-radius: 999px;
  font: 600 0.95rem/1 var(--f-body);
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    transform 0.18s var(--ease),
    background 0.2s var(--ease),
    border-color 0.2s var(--ease);
}
.btn:hover {
  transform: translateY(-1px);
}

.btn--primary {
  background: var(--lapis);
  color: #fff;
}
.btn--primary:hover {
  background: var(--lapis-lit);
}

.btn--ghost {
  border-color: rgba(255, 255, 255, 0.28);
  color: #fff;
}
.btn--ghost:hover {
  border-color: var(--turquoise);
}

/* Not a button — the app is not out yet, so it does not pretend to be. */
.pending {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.8rem 1.35rem;
  border-radius: 999px;
  border: 1px dashed rgba(255, 255, 255, 0.3);
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.88rem;
  font-weight: 500;
}
.pending::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ochre);
  flex: none;
}

/* ==========================================================================
   Sections
   ========================================================================== */

.band {
  padding: clamp(4rem, 8vw, 6.5rem) 0;
}

.band--plaster {
  background: var(--plaster);
}

.band--ink {
  background: var(--ink-2);
  color: rgba(255, 255, 255, 0.78);
  position: relative;
  overflow: hidden;
}
.band--ink h2 {
  color: #fff;
}
.band--ink .eyebrow {
  color: var(--turquoise);
}

.band__head {
  max-width: 40rem;
  margin-bottom: clamp(2.5rem, 5vw, 3.75rem);
}

.band__head h2 {
  font-size: var(--step-h2);
}

.band__head p {
  margin: 1rem 0 0;
  font-size: 1.05rem;
}

/* ==========================================================================
   Tile grid — each capability is one cell of the wall
   ========================================================================== */

.tiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.tile {
  background: var(--plaster);
  padding: 2rem 1.75rem 2.1rem;
  position: relative;
  transition: background 0.25s var(--ease);
}
.tile:hover {
  background: #fff;
}

.tile__mark {
  width: 34px;
  height: 34px;
  color: var(--lapis);
  margin-bottom: 1.15rem;
}

.tile__mark span {
  display: block;
  width: 100%;
  height: 100%;
  background-color: currentColor;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}

.tile h3 {
  font-size: var(--step-h3);
  margin-bottom: 0.5rem;
}

.tile p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--slate);
}

@media (max-width: 900px) {
  .tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .tiles {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .tiles {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Operator band
   ========================================================================== */

.split {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
  position: relative;
  z-index: 2;
}

@media (max-width: 720px) {
  .split {
    grid-template-columns: 1fr;
  }
}

.checklist {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.85rem;
}

.checklist li {
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
  font-size: 0.98rem;
}

/* A single khatam star as the marker — pulled straight out of the lattice,
   because these are tiles in the same wall, not bullet points. */
.checklist li::before {
  content: "";
  flex: none;
  width: 13px;
  height: 13px;
  margin-top: 0.42em;
  background-color: var(--ochre);
  -webkit-mask: url("../img/star.svg") no-repeat center / contain;
  mask: url("../img/star.svg") no-repeat center / contain;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.foot {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.6);
  padding: 3.5rem 0 2.5rem;
  font-size: 0.9rem;
}

.foot__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 2.5rem;
  justify-content: space-between;
  align-items: flex-start;
}

.foot__links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.foot a {
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
}
.foot a:hover {
  color: var(--turquoise);
  text-decoration: underline;
}

.foot__rule {
  margin: 2.5rem 0 1.5rem;
  height: 1px;
  background: rgba(255, 255, 255, 0.12);
  border: 0;
}

.foot__fine {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.42);
  margin: 0;
}

/* ==========================================================================
   Documents (privacy, terms, support, deletion)
   ========================================================================== */

.dochead {
  background: var(--ink);
  color: #fff;
  position: relative;
  overflow: hidden;
  padding: clamp(3rem, 7vw, 5rem) 0 clamp(2.5rem, 5vw, 3.5rem);
}

.dochead__inner {
  position: relative;
  z-index: 2;
}

.dochead h1 {
  color: #fff;
  font-size: clamp(2rem, 4.6vw, 3.1rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.dochead .eyebrow {
  color: var(--turquoise);
}

.dochead__meta {
  margin: 1.1rem 0 0;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
}

.doc {
  display: grid;
  grid-template-columns: 15rem minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  padding: clamp(3rem, 6vw, 4.5rem) 0 5rem;
  align-items: start;
}

@media (max-width: 900px) {
  .doc {
    grid-template-columns: 1fr;
  }
  .toc {
    position: static !important;
    border-left: 0 !important;
    border-top: 1px solid var(--line);
    padding: 1.25rem 0 0 !important;
  }
}

.toc {
  position: sticky;
  top: 88px;
  font-size: 0.86rem;
  border-left: 1px solid var(--line);
  padding-left: 1.25rem;
}

.toc p {
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 0.75rem;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}

.toc a {
  color: var(--slate-dim);
  text-decoration: none;
}
.toc a:hover {
  color: var(--lapis);
}

.prose {
  max-width: 42rem;
}

.prose h2 {
  font-size: clamp(1.25rem, 2vw, 1.55rem);
  margin: 3rem 0 0.9rem;
  scroll-margin-top: 90px;
  display: flex;
  gap: 0.7rem;
  align-items: baseline;
}

.prose h2:first-child {
  margin-top: 0;
}

/* Section marker: the same star as the lattice, at reading scale. */
.prose h2::before {
  content: "";
  flex: none;
  width: 13px;
  height: 13px;
  background-color: var(--turquoise);
  -webkit-mask: url("../img/star.svg") no-repeat center / contain;
  mask: url("../img/star.svg") no-repeat center / contain;
}

.prose h3 {
  font-size: 1.02rem;
  margin: 1.8rem 0 0.5rem;
  font-family: var(--f-body);
  font-weight: 700;
  letter-spacing: 0;
}

.prose p,
.prose li {
  font-size: 1rem;
  line-height: 1.72;
}

.prose ul,
.prose ol {
  padding-left: 1.15rem;
}

.prose li {
  margin-bottom: 0.5rem;
}

.prose li::marker {
  color: var(--slate-dim);
}

.prose strong {
  color: var(--ink);
}

.callout {
  border: 1px solid var(--line);
  border-left: 3px solid var(--lapis);
  background: #fff;
  padding: 1.15rem 1.35rem;
  margin: 1.75rem 0;
  border-radius: 0 6px 6px 0;
}

.callout p {
  margin: 0;
  font-size: 0.95rem;
}
.callout p + p {
  margin-top: 0.6rem;
}

.datatable {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.92rem;
}

.datatable th,
.datatable td {
  text-align: left;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--line);
  vertical-align: top;
}

.datatable th {
  background: var(--plaster-2);
  color: var(--ink);
  font-weight: 600;
}

.tablewrap {
  overflow-x: auto;
}

/* ==========================================================================
   Quality floor
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .lattice__pattern path,
  .glazed {
    animation: none !important;
    stroke-dashoffset: 0 !important;
    opacity: 1;
  }
  .glazed {
    opacity: 0.14;
  }
  .btn:hover {
    transform: none;
  }
}

/* Glazed cells — the few tiles in the wall that catch the light. */
.lattice .glazed {
  stroke: none;
}
.lattice .glazed--lapis {
  fill: var(--lapis);
}
.lattice .glazed--turquoise {
  fill: var(--turquoise);
}
.lattice .glazed--ochre {
  fill: var(--ochre);
}
