/* 5-variant: "Rasmiy" — sodda, nafis, islomiy geometriya */
:root {
  --fon: #f7f4ee;
  --qogoz: #fbf9f4;
  --matn: #1d1f1c;
  --xira: #6e6b64;
  --asosiy: #0f3d33;
  --asosiy-2: #0f3d33;
  --oltin: #a8844a;
  --arab: #0f3d33;
  --chiziq: rgba(168, 132, 74, .35);
  --soya: none;
  --tugma-fon: transparent;
  --tugma-matn: #0f3d33;
  --ease: cubic-bezier(.22, .7, .1, 1);
}

html { background: var(--fon); }
body {
  background-color: var(--fon);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64'%3E%3Cg fill='none' stroke='%23a8844a' stroke-opacity='.11' stroke-width='.8'%3E%3Cpath d='M32 17L36.39 21.39L42.61 21.39L42.61 27.61L47 32L42.61 36.39L42.61 42.61L36.39 42.61L32 47L27.61 42.61L21.39 42.61L21.39 36.39L17 32L21.39 27.61L21.39 21.39L27.61 21.39Z'/%3E%3Cpath d='M32 0V17M32 47V64M0 32H17M47 32H64M0 0L21.4 21.4M64 0L42.6 21.4M0 64L21.4 42.6M64 64L42.6 42.6'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 64px 64px;
}

main { width: 100%; max-width: 560px; margin: 0 auto; padding: 0 22px; }

/* ---------- Panel ---------- */
.panel__ovoz, .til { background: var(--qogoz); box-shadow: none; border-color: var(--chiziq); }

/* =========================================================
   1. BOSH
   ========================================================= */
.bosh {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 72px 14px 96px;
  text-align: center;
}

/* Hujjat hoshiyasi: ikki chiziq orasida naqshli tasma (qo'lyozma "jadval"i kabi) */
.hoshiya {
  position: absolute;
  top: 14px; right: -8px; bottom: 14px; left: -8px;
  top: calc(14px + env(safe-area-inset-top));
  padding: 10px;
  border: 1px solid rgba(168, 132, 74, .55);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16'%3E%3Cpath d='M8 3.4L9.35 4.75L11.25 4.75L11.25 6.65L12.6 8L11.25 9.35L11.25 11.25L9.35 11.25L8 12.6L6.65 11.25L4.75 11.25L4.75 9.35L3.4 8L4.75 6.65L4.75 4.75L6.65 4.75Z' fill='%23a8844a' fill-opacity='.55'/%3E%3Ccircle cx='0' cy='0' r='1' fill='%230f3d33' fill-opacity='.5'/%3E%3Ccircle cx='16' cy='0' r='1' fill='%230f3d33' fill-opacity='.5'/%3E%3Ccircle cx='0' cy='16' r='1' fill='%230f3d33' fill-opacity='.5'/%3E%3Ccircle cx='16' cy='16' r='1' fill='%230f3d33' fill-opacity='.5'/%3E%3C/svg%3E");
  background-size: 16px 16px;
  background-position: 1px 1px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.4s ease;
}
.hoshiya::after {
  content: "";
  position: absolute;
  top: 10px; right: 10px; bottom: 10px; left: 10px;
  border: 1px solid rgba(168, 132, 74, .55);
  background: var(--fon);
}

/* Orqa fonda markazdan tarqaluvchi girih */
.bosh__naqsh {
  position: absolute;
  top: 40px; right: 0; bottom: 40px; left: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64'%3E%3Cg fill='none' stroke='%23a8844a' stroke-opacity='.5' stroke-width='.8'%3E%3Cpath d='M32 17L36.39 21.39L42.61 21.39L42.61 27.61L47 32L42.61 36.39L42.61 42.61L36.39 42.61L32 47L27.61 42.61L21.39 42.61L21.39 36.39L17 32L21.39 27.61L21.39 21.39L27.61 21.39Z'/%3E%3Cpath d='M34.68 25.53L35.79 28.21L38.47 29.32L37.36 32L38.47 34.68L35.79 35.79L34.68 38.47L32 37.36L29.32 38.47L28.21 35.79L25.53 34.68L26.64 32L25.53 29.32L28.21 28.21L29.32 25.53L32 26.64Z'/%3E%3Cpath d='M32 0V17M32 47V64M0 32H17M47 32H64M0 0L21.4 21.4M64 0L42.6 21.4M0 64L21.4 42.6M64 64L42.6 42.6'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 64px 64px;
  background-position: center;
  opacity: .5;
  -webkit-mask-image: radial-gradient(closest-side, #000 0%, rgba(0, 0, 0, .35) 55%, transparent 100%);
  mask-image: radial-gradient(closest-side, #000 0%, rgba(0, 0, 0, .35) 55%, transparent 100%);
  -webkit-clip-path: circle(0% at 50% 42%);
  clip-path: circle(0% at 50% 42%);
  pointer-events: none;
}

/* Mehrob ravoq ichidagi asosiy qism */
.mehrob { position: relative; z-index: 1; width: 100%; max-width: 380px; padding: 30px 26px 30px; }
.mehrob__ravoq {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  -webkit-clip-path: inset(100% 0 0 0);
  clip-path: inset(100% 0 0 0);
}
.mehrob__ravoq path { fill: none; stroke: var(--oltin); stroke-width: 1; vector-effect: non-scaling-stroke; }
.mehrob__ravoq path + path { stroke-opacity: .45; }

.bismillah { margin: 0; font-family: var(--f-arab); font-size: 30px; line-height: 1.9; color: var(--asosiy); }
.bismillah span {
  display: inline-block;
  padding: 0 .2em;
  -webkit-clip-path: inset(0 0 0 100%);
  clip-path: inset(0 0 0 100%);
}

/* 8 qirrali yulduz — sirkul va chizg'ich bilan chizilgandek */
.xotam { width: 200px; height: 200px; margin: 16px auto 20px; overflow: visible; }
.xotam g.xotam__halqa { opacity: 0; transform: scale(.9); }
.xotam .xotam__halqa circle { stroke: var(--oltin); stroke-width: 1.4; stroke-linecap: round; stroke-dasharray: 0 6 !important; stroke-dashoffset: 0 !important; }
.xotam .xotam__halqa path { fill: url(#g-zar); stroke: none; stroke-dasharray: none !important; stroke-dashoffset: 0 !important; }
.xotam path, .xotam circle { fill: none; stroke-dasharray: 1; stroke-dashoffset: 1; }
.xotam__qurilish circle, .xotam__qurilish path { stroke: var(--oltin); stroke-width: .6; }
.xotam__kv { stroke: var(--oltin); stroke-width: .9; }
.xotam__yulduz { stroke: url(#g-zar); stroke-width: 1.6; }
.xotam__ichki { stroke: url(#g-zar); stroke-width: 1; }
.xotam path.xotam__toldirish { fill: var(--asosiy); stroke: none; stroke-dasharray: none; opacity: 0; }
.xotam path.xotam__markaz { fill: url(#g-zar); stroke: none; stroke-dasharray: none; opacity: 0; transform: scale(.4); }

.turi {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .42em;
  text-transform: uppercase;
  color: var(--oltin);
}
.ism {
  margin: 14px 0 0;
  font-family: var(--f-bosh);
  font-size: 58px;
  font-size: clamp(44px, 14vw, 78px);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: .02em;
  background: linear-gradient(100deg, var(--asosiy) 0%, var(--asosiy) 40%, #c9a86b 50%, var(--asosiy) 60%, var(--asosiy) 100%);
  background-size: 300% 100%;
  background-position: 100% 0;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.ism span { font-style: italic; font-weight: 400; font-size: .55em; }
.ism-yon { margin: 8px 0 0; font-family: var(--f-bosh); font-size: 22px; font-style: italic; color: var(--xira); opacity: 0; transform: translateY(14px); }
.tayyor .ism-yon { animation: kotaril .9s var(--ease) 3.45s forwards; }
.tayyor .ism + .ism-yon { animation-delay: 3.7s; }
.sana-qator {
  margin: 18px 0 0;
  display: flex;
  align-items: center;
  font-family: var(--f-bosh);
  font-size: 22px;
  letter-spacing: .18em;
  color: var(--matn);
}
.sana-qator i { width: 4px; height: 4px; margin: 0 14px; background: var(--oltin); transform: rotate(45deg); }
.bosh .suring { position: absolute; left: 0; right: 0; bottom: 34px; bottom: calc(30px + env(safe-area-inset-bottom)); }
.suring i::after { background: var(--oltin); }

/* Boshlang'ich holat */
.turi, .ism, .sana-qator, .bosh .suring { opacity: 0; transform: translateY(14px); }

/* ---------- Ochilish ketma-ketligi (body.tayyor) ---------- */
.tayyor .hoshiya { opacity: 1; }
.tayyor .bosh__naqsh { animation: tarqal 3.2s cubic-bezier(.3, 0, .2, 1) 2.6s forwards; }
.tayyor .mehrob__ravoq { animation: kotarilish 2.2s cubic-bezier(.45, 0, .2, 1) .3s forwards; }
.tayyor .xotam g.xotam__halqa { animation: halqa 1.4s var(--ease) 3.4s forwards; }
.tayyor .bismillah span { animation: yozish 1.9s cubic-bezier(.45, 0, .2, 1) .2s forwards; }
.tayyor .xotam__qurilish circle { animation: chiz 1.1s var(--ease) .5s forwards; }
.tayyor .xotam__qurilish path { animation: chiz 1s var(--ease) .8s forwards; }
.tayyor .xotam__yulduz { animation: chiz 1.1s var(--ease) 2.1s forwards; }
.tayyor .xotam__ichki { animation: chiz 1s var(--ease) 2.5s forwards; }
.tayyor .xotam path.xotam__toldirish { animation: paydo 1.2s ease 2.9s forwards; }
.tayyor .xotam path.xotam__markaz { animation: markaz 1s var(--ease) 3.2s forwards; }
.tayyor .xotam__qurilish { animation: xiralash 1.2s ease 3.3s forwards; }
.tayyor .xotam__kv { animation: chiz .9s var(--ease) forwards, xiralash 1.2s ease 3.3s forwards; }
.tayyor .xotam__kv--1 { animation-delay: 1.3s, 3.3s; }
.tayyor .xotam__kv--2 { animation-delay: 1.6s, 3.3s; }
.tayyor .turi { animation: kotaril .9s var(--ease) 3.3s forwards; }
.tayyor .ism { animation: kotaril 1s var(--ease) 3.5s forwards, zarhal 2.6s ease 4.1s forwards; }
.tayyor .sana-qator { animation: kotaril .9s var(--ease) 3.8s forwards; }
.tayyor .bosh .suring { animation: kotaril .9s var(--ease) 4.3s forwards; }

@keyframes yozish { to { -webkit-clip-path: inset(0 0 0 0); clip-path: inset(0 0 0 0); } }
@keyframes chiz { to { stroke-dashoffset: 0; } }
@keyframes paydo { to { opacity: 1; } }
@keyframes xiralash { to { opacity: .22; } }
@keyframes markaz { to { opacity: 1; transform: none; } }
@keyframes kotaril { to { opacity: 1; transform: none; } }
@keyframes zarhal { to { background-position: 0 0; } }
@keyframes tarqal { to { -webkit-clip-path: circle(75% at 50% 42%); clip-path: circle(75% at 50% 42%); } }
@keyframes kotarilish { to { -webkit-clip-path: inset(0 0 0 0); clip-path: inset(0 0 0 0); } }
@keyframes halqa { to { opacity: 1; transform: none; } }

/* =========================================================
   Bo'limlar
   ========================================================= */
.bolim5 { padding: 76px 0 8px; text-align: center; }

.kicker { margin: 0; font-size: 12px; font-weight: 600; letter-spacing: .36em; text-transform: uppercase; color: var(--oltin); }
.kimga { margin: 10px 0 0; font-family: var(--f-bosh); font-size: 36px; font-size: clamp(30px, 8.6vw, 42px); font-weight: 500; line-height: 1.15; color: var(--asosiy); }
.matn { margin: 20px auto 0; max-width: 32ch; font-family: var(--f-bosh); font-size: 21px; line-height: 1.55; color: var(--matn); }
.imzo5 { margin: 30px 0 0; font-family: var(--f-bosh); font-size: 24px; font-weight: 600; color: var(--asosiy); }
.imzo5 span { display: block; margin-bottom: 2px; font-family: var(--f-matn); font-size: 12px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--xira); }

.arab { font-size: 25px; line-height: 2.1; color: var(--asosiy); }
.maano { margin: 16px auto 0; max-width: 34ch; font-size: 19px; color: var(--matn); }
.manba { margin: 14px 0 0; font-size: 11px; font-weight: 600; letter-spacing: .26em; text-transform: uppercase; color: var(--oltin); }
.sarlavha5 { margin: 0; font-size: 12px; font-weight: 600; letter-spacing: .4em; text-transform: uppercase; color: var(--oltin); }

/* Tafsilotlar */
.tafsilot { margin: 26px 0 0; text-align: left; }
.tafsilot > div {
  display: grid;
  grid-template-columns: 92px 1fr;
  padding: 18px 0;
  border-top: 1px solid var(--chiziq);
}
.tafsilot > div:last-child { border-bottom: 1px solid var(--chiziq); }
.tafsilot dt { padding-top: 5px; font-size: 11px; font-weight: 600; letter-spacing: .26em; text-transform: uppercase; color: var(--oltin); }
.tafsilot dd { margin: 0; font-family: var(--f-bosh); font-size: 22px; line-height: 1.3; color: var(--matn); }
.tafsilot small { display: block; margin-top: 4px; font-family: var(--f-matn); font-size: 13.5px; line-height: 1.45; color: var(--xira); }

.havolalar { display: flex; flex-wrap: wrap; justify-content: center; margin-top: 22px; }
.havolalar a, .havolalar button {
  position: relative;
  margin: 6px 12px;
  padding: 4px 0;
  border: 0;
  background: none;
  font-family: var(--f-matn);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--asosiy);
  text-decoration: none;
  cursor: pointer;
}
.havolalar a::after, .havolalar button::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--oltin);
  transform-origin: left;
  transition: transform .35s var(--ease);
}
@media (hover: hover) { .havolalar a:hover::after, .havolalar button:hover::after { transform: scaleX(.35); } }

.eslatma5 { list-style: none; margin: 22px 0 0; padding: 0; font-family: var(--f-bosh); font-size: 18px; font-style: italic; color: var(--xira); }
.eslatma5 li { padding: 2px 0; }

/* Omin */
.omin { margin-top: 26px; padding: 10px 34px; border-color: var(--oltin); color: var(--asosiy); font-weight: 600; letter-spacing: .12em; text-transform: uppercase; font-size: 13px; }
.omin[aria-pressed="true"] { background: var(--asosiy); border-color: var(--asosiy); color: var(--qogoz); }

/* Yakun */
.yakun5 > *:not(.fon-shamsa) { position: relative; }
.yakun5 { position: relative; overflow: hidden; padding: 76px 0 44px; padding-bottom: calc(44px + env(safe-area-inset-bottom)); text-align: center; }
.yakun5 .imzo5 { margin-top: 0; font-size: 28px; }
.aloqa5 { margin: 20px 0 0; font-size: 13.5px; color: var(--xira); }
.aloqa5 a { font-family: var(--f-bosh); font-size: 20px; font-weight: 600; color: var(--asosiy); text-decoration: none; letter-spacing: .04em; }
.ulashish5 {
  margin-top: 28px;
  padding: 12px 28px;
  border: 1px solid var(--asosiy);
  background: var(--asosiy);
  color: var(--qogoz);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform .15s ease;
}
.ulashish5:active { transform: scale(.97); }

@media (max-height: 640px) {
  .xotam { width: 130px; height: 130px; margin: 12px auto 16px; }
  .bismillah { font-size: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  .bismillah span { -webkit-clip-path: none; clip-path: none; }
  .xotam path, .xotam circle { stroke-dashoffset: 0; }
  .xotam path.xotam__toldirish, .xotam path.xotam__markaz, .turi, .ism, .ism-yon, .sana-qator, .bosh .suring { opacity: 1; transform: none; }
  .ism { background-position: 0 0; }
  .bosh__naqsh, .mehrob__ravoq { -webkit-clip-path: none; clip-path: none; }
  .xotam g.xotam__halqa { opacity: 1; transform: none; }
}
