/* Amal site — same tokens as the app (Amal/DesignSystem/Theme.swift).
   Flat solid surfaces, no outlines / gradients / glows. */

:root {
  --bg: #08090A;
  --surface: #141516;
  --surface-2: #1C1D1F;
  --surface-3: #1E1F21;
  --track: #26272A;
  --text: #F2F4F1;
  --text-2: rgba(242, 244, 241, 0.62);
  --text-3: rgba(242, 244, 241, 0.45);
  --accent: #1BEB41;
  --on-accent: #021A07;
  --warning: #FF7A3D;
  --warning-text: #FF9A66;
  --radius-card: 22px;
  --radius-control: 16px;
  --page: 680px;
  --gutter: 20px;
  color-scheme: dark;
}

@font-face {
  font-family: "Onest";
  src: url("fonts/Onest-Variable.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}

* { box-sizing: border-box; }

html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Onest", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

.wrap {
  width: 100%;
  max-width: var(--page);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Header / footer (hidden inside the app — it has its own navigation bar) */

.site-header {
  padding: 22px 0 8px;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 600;
  font-size: 17px;
}

.brand:hover { text-decoration: none; }

.brand img {
  width: auto;
  height: 24px;
}

.site-nav {
  display: flex;
  gap: 18px;
  font-size: 15px;
}

.site-nav a { color: var(--text-2); }
.site-nav a[aria-current="page"] { color: var(--text); }

.site-footer {
  padding: 48px 0 40px;
  color: var(--text-3);
  font-size: 14px;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

.site-footer a { color: var(--text-2); }

/* Inside the app: no site chrome, tighter top. */

html.in-app .site-header,
html.in-app .site-footer,
html.in-app .eyebrow,
html.in-app .only-web { display: none; }

html:not(.in-app) .only-app { display: none; }

html.in-app main { padding-top: 12px; }

main { padding: 28px 0 24px; }

/* Type */

.eyebrow {
  margin: 0 0 10px;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 600;
}

h1 {
  margin: 0 0 12px;
  font-size: clamp(30px, 8.6vw, 40px);
  hyphens: auto;
  -webkit-hyphens: auto;
  overflow-wrap: break-word;
  line-height: 1.08;
  font-weight: 600;
  letter-spacing: -1.2px;
}

h2 {
  margin: 40px 0 10px;
  font-size: 22px;
  line-height: 1.25;
  font-weight: 600;
  letter-spacing: -0.3px;
}

h3 {
  margin: 24px 0 6px;
  font-size: 17px;
  font-weight: 600;
}

p { margin: 0 0 14px; }

.lead {
  color: var(--text-2);
  font-size: 18px;
}

.meta {
  color: var(--text-3);
  font-size: 14px;
}

ul, ol { margin: 0 0 14px; padding-left: 22px; }
li { margin: 4px 0; }
li::marker { color: var(--text-3); }

strong { font-weight: 600; }

/* Cards: flat, 2px gaps between rows */

.stack {
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-radius: var(--radius-card);
  overflow: hidden;
  margin: 18px 0;
}

.row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  min-height: 64px;
  background: var(--surface);
  color: var(--text);
}

a.row:hover { text-decoration: none; background: var(--surface-2); }
a.row:active { background: var(--surface-2); }

.row .tile {
  flex: none;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--surface-3);
  color: var(--text);
}

.row .tile svg { width: 20px; height: 20px; }

.row .body { flex: 1; min-width: 0; }
.row .title { display: block; font-weight: 500; line-height: 1.3; }
.row .sub { display: block; color: var(--text-2); font-size: 14px; line-height: 1.4; margin-top: 2px; }

.row .chevron {
  flex: none;
  color: var(--text-3);
  width: 16px;
  height: 16px;
}

/* "Коротко" block at the top of a document */

.summary {
  margin: 22px 0 8px;
  padding: 20px;
  border-radius: var(--radius-card);
  background: var(--surface);
}

.summary h2 { margin: 0 0 12px; font-size: 18px; }

.summary ul { list-style: none; padding: 0; margin: 0; }

.summary li {
  position: relative;
  padding-left: 30px;
  margin: 10px 0;
  line-height: 1.45;
}

.summary li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.2l3 3 6-6.4' fill='none' stroke='%23021A07' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 20px no-repeat;
}

/* Table of contents */

.toc {
  margin: 18px 0 8px;
  padding: 0;
  list-style: none;
  counter-reset: toc;
  font-size: 15px;
}

.toc li { counter-increment: toc; margin: 6px 0; }
.toc li::before { content: counter(toc) ". "; color: var(--text-3); }
.toc a { color: var(--text-2); }

/* Document sections are numbered like the TOC */

.doc { counter-reset: section; }
.doc > h2 { counter-increment: section; }
.doc > h2::before { content: counter(section) ". "; color: var(--text-3); }

.note {
  margin: 18px 0;
  padding: 16px 18px;
  border-radius: var(--radius-control);
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 15px;
}

/* Buttons */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 56px;
  padding: 0 24px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font: inherit;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
}

.button:hover { text-decoration: none; filter: brightness(1.05); }
.button:active { transform: scale(0.98); }
.button[disabled] { background: var(--track); color: var(--text-3); cursor: default; transform: none; filter: none; }

.button.secondary { background: var(--surface-2); color: var(--text); }

/* Feedback form */

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 18px;
  padding: 0;
  border: 0;
}

.chips legend { margin-bottom: 8px; padding: 0; color: var(--text-2); font-size: 14px; font-weight: 600; }

.chip input { position: absolute; opacity: 0; pointer-events: none; }

.chip span {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
}

.chip input:checked + span { background: var(--accent); color: var(--on-accent); font-weight: 600; }
.chip input:focus-visible + span { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent); }

label.field { display: block; margin: 0 0 8px; color: var(--text-2); font-size: 14px; font-weight: 600; }

textarea {
  display: block;
  width: 100%;
  min-height: 160px;
  margin: 0 0 16px;
  padding: 16px 18px;
  border: 0;
  border-radius: var(--radius-control);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 16px;
  line-height: 1.5;
  resize: vertical;
}

textarea::placeholder { color: var(--text-3); }
textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; }

.hint { margin: 10px 0 0; color: var(--text-3); font-size: 14px; text-align: center; }

/* FAQ */

details {
  background: var(--surface);
}

details summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  font-weight: 500;
  line-height: 1.35;
  list-style: none;
  cursor: pointer;
}

details summary::-webkit-details-marker { display: none; }

details summary::after {
  content: "";
  flex: none;
  width: 12px;
  height: 12px;
  border-right: 2px solid var(--text-3);
  border-bottom: 2px solid var(--text-3);
  transform: rotate(45deg) translateY(-3px);
  transition: transform 0.2s ease;
}

details[open] summary::after { transform: rotate(225deg) translateY(-3px); }

details .answer { padding: 0 18px 16px; color: var(--text-2); font-size: 16px; }
details .answer p:last-child { margin-bottom: 0; }

/* Landing */

.hero { padding: 24px 0 8px; }
.hero h1 { font-size: clamp(38px, 11vw, 48px); letter-spacing: -1.6px; }

.points {
  display: grid;
  gap: 2px;
  margin: 26px 0;
  border-radius: var(--radius-card);
  overflow: hidden;
}

.point { padding: 18px 20px; background: var(--surface); }
.point b { display: block; font-weight: 600; margin-bottom: 2px; }
.point span { color: var(--text-2); font-size: 15px; }

@media (min-width: 720px) {
  h1 { font-size: 48px; }
  .hero h1 { font-size: 64px; }
  main { padding-top: 48px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
