/* ==========================================================================
   Taklifnoma sayti — asosiy uslublar
   Ranglar Samarqand koshinlaridan olingan: lojuvard tun, feruza va tilla.
   Feruza = Premium darajasi, tilla = VIP darajasi (butun saytda bir xil).
   ========================================================================== */

@property --glow { syntax: '<color>'; inherits: true; initial-value: #F2BF63; }
@property --ang  { syntax: '<angle>'; inherits: false; initial-value: 0deg; }

:root {
  --lapis-950: #050819;
  --lapis-900: #080D2B;
  --lapis-800: #0C1340;
  --lapis-700: #131C58;
  --lapis-600: #1D2876;
  --ivory: #F6F0E2;
  --ivory-70: rgba(246, 240, 226, .72);
  --ivory-45: rgba(246, 240, 226, .5);
  --ivory-14: rgba(246, 240, 226, .14);
  --ivory-07: rgba(246, 240, 226, .07);
  --feruza: #3FD3C4;
  --tilla: #F2BF63;
  --anor: #F0718A;

  --font-display: 'El Messiri', 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, serif;
  --font-body: 'Onest', 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --page: min(1180px, 100% - 40px);
  --girih: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='96' viewBox='0 0 96 96' fill='none' stroke='%23F6F0E2' stroke-opacity='.065'%3E%3Crect x='26' y='26' width='44' height='44'/%3E%3Crect x='26' y='26' width='44' height='44' transform='rotate(45 48 48)'/%3E%3Cpath d='M0 48h17M79 48h17M48 0v17M48 79v17'/%3E%3C/svg%3E");
}

[data-tier="premium"] { --tier: var(--feruza); --tier-ink: #03211E; }
[data-tier="vip"]     { --tier: var(--tilla);  --tier-ink: #2B1C02; }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--lapis-900);
  color: var(--ivory);
  font: 400 1.0625rem/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
svg { display: block; }
[hidden] { display: none !important; }

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

.skip { position: absolute; left: 16px; top: -60px; z-index: 50; padding: 10px 16px; border-radius: 10px; background: var(--ivory); color: var(--lapis-900); font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }

/* --------------------------------------------------------------- tugmalar */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 50px; padding: 0 26px; border: 1px solid transparent; border-radius: 999px;
  font-weight: 600; font-size: 1rem; line-height: 1.2; text-decoration: none; text-align: center; white-space: nowrap;
  transition: transform .25s var(--ease-out), background-color .2s, border-color .2s, color .2s, box-shadow .25s;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--ivory); color: var(--lapis-900); box-shadow: 0 14px 34px -14px rgba(246, 240, 226, .55); }
.btn-primary:hover { background: #fff; transform: translateY(-2px); }
.btn-primary:active { transform: scale(.97); }
.btn-ghost { border-color: var(--ivory-14); background: var(--ivory-07); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.btn-ghost:hover { border-color: var(--ivory-45); }
.btn-tier { border-color: color-mix(in srgb, var(--tier) 55%, transparent); color: var(--tier); background: color-mix(in srgb, var(--tier) 8%, transparent); }
.btn-tier:hover { background: var(--tier); color: var(--tier-ink); }
.btn[disabled] { opacity: .6; pointer-events: none; }

.icon-btn { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--ivory-14); background: var(--ivory-07); }
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn:hover { border-color: var(--ivory-45); }

/* Daraja belgisi */
.tier {
  display: inline-flex; align-items: center; gap: .4em; padding: .22em .75em .22em .55em; border-radius: 999px;
  font-size: .82rem; font-weight: 600; line-height: 1.4; white-space: nowrap;
  color: var(--tier); border: 1px solid color-mix(in srgb, var(--tier) 55%, transparent); background: color-mix(in srgb, var(--tier) 10%, transparent);
}
.tier svg { width: 1em; height: 1em; fill: currentColor; }
.tier[data-tier="vip"] { background: var(--tilla); color: var(--tier-ink); border-color: var(--tilla); }

/* ------------------------------------------------------------------ tepa */

.top {
  position: fixed; inset: 0 0 auto 0; z-index: 20;
  display: flex; align-items: center; gap: 28px;
  padding: 14px max(20px, calc((100% - 1180px) / 2));
  transition: background-color .3s, backdrop-filter .3s, border-color .3s;
  border-bottom: 1px solid transparent;
}
.top.is-stuck { background: rgba(8, 13, 43, .78); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-bottom-color: var(--ivory-07); }
.brand { display: inline-flex; align-items: center; gap: 10px; font: 700 1.45rem/1 var(--font-display); letter-spacing: .04em; text-decoration: none; }
.brand-mark { width: 26px; height: 26px; fill: var(--tilla); transition: transform .8s var(--ease-out); }
.brand:hover .brand-mark { transform: rotate(90deg); }
.top-nav { display: flex; gap: 26px; margin-left: auto; }
.top-nav a { color: var(--ivory-70); text-decoration: none; font-weight: 500; font-size: .98rem; padding: 8px 0; transition: color .2s; }
.top-nav a:hover { color: var(--ivory); }
.top-cta { min-height: 42px; padding: 0 20px; font-size: .95rem; }

/* ------------------------------------------------------------------ hero */

.hero {
  --pw: clamp(196px, 20.5vw, 280px);            /* telefon eni */
  --shift: calc(var(--pw) * 1.08);              /* telefonlar orasidagi masofa (hammasi bir xil o'lchamda, ustma-ust tushmaydi) */
  position: relative; isolation: isolate;
  padding: 132px 0 56px; text-align: center; overflow: hidden;
  --glow: var(--tilla);
  transition: --glow 1.2s ease;
}
.hero[data-tier="premium"] { --glow: var(--feruza); }
/* Sahna ortidagi yorug'lik: markazdagi shablon darajasiga qarab tilla yoki feruza */
.hero::before {
  content: ""; position: absolute; z-index: -2; left: 50%; bottom: -18%; width: min(1400px, 190vw); aspect-ratio: 1.5; translate: -50% 0;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--glow) 30%, transparent), color-mix(in srgb, var(--lapis-600) 38%, transparent) 52%, transparent 78%);
}
.hero::after {
  content: ""; position: absolute; z-index: -1; inset: 0; background: var(--girih);
  -webkit-mask: radial-gradient(90% 70% at 50% 0%, #000 10%, transparent 75%); mask: radial-gradient(90% 70% at 50% 0%, #000 10%, transparent 75%);
}
.hero-copy { width: var(--page); margin: 0 auto; }
.hero-title {
  font: 600 clamp(2.5rem, 6.6vw, 5.1rem)/1.04 var(--font-display); letter-spacing: -.01em;
  max-width: 15ch; margin: 0 auto; text-wrap: balance;
}
.hero-title .w { display: inline-block; overflow: hidden; vertical-align: bottom; padding-bottom: .12em; margin-bottom: -.12em; }
.hero-title .w > span { display: inline-block; transform: translateY(105%); transition: transform 1s var(--ease-out); transition-delay: calc(var(--i) * 70ms + 100ms); }
.is-ready .hero-title .w > span { transform: none; }
.hero-text { max-width: 56ch; margin: 22px auto 0; color: var(--ivory-70); font-size: clamp(1rem, 1.5vw, 1.15rem); text-wrap: pretty; }
.hero-actions { margin-top: 30px; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 18px 28px; }
.hero-prices { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; color: var(--ivory-70); font-size: .98rem; }
.hero-prices span { display: inline-flex; align-items: center; gap: .45em; }
.hero-prices svg { width: 14px; height: 14px; fill: var(--tier); }
.hero-prices b { color: var(--ivory); font-weight: 600; }
.hero-text, .hero-actions { opacity: 0; transform: translateY(14px); transition: opacity .9s ease .55s, transform .9s var(--ease-out) .55s; }
.hero-actions { transition-delay: .7s; }
.is-ready .hero-text, .is-ready .hero-actions { opacity: 1; transform: none; }

/* Sahna: jonli telefonlar qatori */
.stage-wrap { margin-top: 54px; }
.stage {
  position: relative; height: calc(var(--pw) * 2.104); perspective: 1700px; touch-action: pan-y; user-select: none; -webkit-user-select: none;
}
.slide {
  --o: 0; --abs: 0;
  position: absolute; top: 0; left: 50%; width: var(--pw); margin-left: calc(var(--pw) / -2); padding: 0; border: 0; background: none; text-align: left;
  transform: translateX(calc(var(--o) * var(--shift)));   /* yon telefonlar kichraytirilmaydi: hammasi bir xil o'lchamda */
  filter: brightness(calc(1 - var(--abs) * .3)) saturate(calc(1 - var(--abs) * .2));
  transition: transform 1s var(--ease-out), filter .8s ease, opacity .6s ease;
  will-change: transform;
}
.slide.is-off { opacity: 0; pointer-events: none; }
.slide.is-active { cursor: zoom-in; }
.stage.is-intro .slide { transform: translateY(70px) scale(.72); opacity: 0; }
.stage:not(.is-intro) .slide { transition-delay: calc(var(--abs) * 90ms); }
.stage.is-settled .slide { transition-delay: 0s; }

.stage-bar { width: min(560px, 100% - 40px); margin: 26px auto 0; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.stage-now { min-width: 0; display: grid; justify-items: center; gap: 12px; }
.stage-name { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 12px; font: 600 1.35rem/1.2 var(--font-display); }
.stage-name .tier { font-family: var(--font-body); }
.stage-arrow { display: grid; place-items: center; flex: none; width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--ivory-14); background: var(--ivory-07); transition: border-color .2s, transform .25s var(--ease-out); }
.stage-arrow:hover { border-color: var(--ivory-45); }
.stage-arrow:active { transform: scale(.92); }
.stage-arrow svg { width: 20px; height: 20px; }
.stage-arrow.is-next svg { rotate: 180deg; }
.stage-dots { display: flex; gap: 7px; align-items: center; }
.dot { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 99px; background: var(--ivory-14); overflow: hidden; position: relative; transition: width .5s var(--ease-out), background-color .3s; }
.dot::before { content: ""; position: absolute; inset: -14px -4px; }   /* bosish maydoni kattaroq */
.dot.is-active { width: 38px; }
.dot.is-active::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--glow); transform-origin: 0 50%; animation: fill var(--dwell, 9s) linear forwards; }
.stage.is-paused ~ .stage-bar .dot.is-active::after { animation-play-state: paused; }
@keyframes fill { from { transform: scaleX(0); } }

/* --------------------------------------------------------------- telefon */

.phone {
  position: relative; display: block; padding: 2.6%; border-radius: 13% / 6.2%;
  background: linear-gradient(155deg, #37408A, #0A0E2E 42%, #151C55);
  box-shadow: inset 0 0 0 1px rgba(246, 240, 226, .16), 0 44px 80px -36px rgba(0, 0, 0, .85);
  transition: box-shadow .8s ease;
}
.slide.is-active .phone, .card:focus-visible .phone, .viewer .phone, .card.is-hot .phone {
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tier) 55%, transparent), 0 44px 80px -36px rgba(0, 0, 0, .85), 0 26px 110px -26px color-mix(in srgb, var(--tier) 60%, transparent);
}
.screen {
  position: relative; display: block; aspect-ratio: 390 / 844; overflow: hidden; border-radius: 11% / 5.1%; container-type: inline-size;
  background: linear-gradient(170deg, var(--lapis-700), var(--lapis-900));
}
.screen-media {
  position: absolute; top: 0; left: 0; width: 390px; height: 844px; border: 0; background: #fff;
  transform-origin: 0 0; transform: scale(var(--s, 1)); opacity: 0; transition: opacity .7s ease; pointer-events: none;
}
video.screen-media, img.screen-media { width: 100%; height: 100%; transform: none; object-fit: cover; background: #000; }
.screen.is-ready .screen-media { opacity: 1; }
.screen.is-interactive .screen-media { pointer-events: auto; }
.screen-wait {
  position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 14px; padding: 12%; text-align: center;
  font: 600 clamp(.8rem, 6cqw, 1.2rem)/1.25 var(--font-display); color: var(--ivory-70); transition: opacity .5s ease;
}
.screen-wait svg { width: 34%; max-width: 64px; aspect-ratio: 1; fill: none; stroke: var(--tier, var(--tilla)); stroke-width: .8; animation: turn 9s linear infinite; }
.screen.is-ready .screen-wait { opacity: 0; }
@keyframes turn { to { rotate: 360deg; } }

/* ---------------------------------------------------------------- bloklar */

.block { width: var(--page); margin: 0 auto; padding: clamp(72px, 10vw, 128px) 0 0; }
.block-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 22px 40px; margin-bottom: clamp(30px, 4.5vw, 52px); }
.block h2 { font: 600 clamp(2rem, 4.4vw, 3.3rem)/1.08 var(--font-display); letter-spacing: -.005em; }
.block-lead { max-width: 46ch; margin-top: 12px; color: var(--ivory-70); }

.filters { display: grid; gap: 12px; justify-items: end; }
.seg { display: inline-flex; padding: 5px; border-radius: 999px; background: var(--ivory-07); border: 1px solid var(--ivory-14); max-width: 100%; }
.seg button {
  display: inline-flex; align-items: center; gap: .5em; min-height: 42px; padding: 0 18px; border: 0; border-radius: 999px; background: none;
  font-weight: 600; font-size: .95rem; color: var(--ivory-70); white-space: nowrap; transition: background-color .25s, color .25s;
}
.seg button svg { width: 12px; height: 12px; fill: var(--tier); }
.seg button small { font-size: .88em; font-weight: 500; opacity: .75; }
.seg button:hover { color: var(--ivory); }
.seg button[aria-pressed="true"] { background: var(--ivory); color: var(--lapis-900); }
.seg button[aria-pressed="true"][data-tier] { background: var(--tier); color: var(--tier-ink); }
.seg button[aria-pressed="true"] svg { fill: currentColor; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.chips button { min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--ivory-14); background: none; color: var(--ivory-70); font-size: .9rem; font-weight: 500; transition: border-color .2s, color .2s, background-color .2s; }
.chips button:hover { border-color: var(--ivory-45); color: var(--ivory); }
.chips button[aria-pressed="true"] { border-color: var(--ivory); color: var(--ivory); background: var(--ivory-07); }

.grid { display: grid; align-items: start; grid-template-columns: repeat(auto-fill, minmax(min(214px, 100%), 1fr)); gap: clamp(28px, 4vw, 52px) clamp(16px, 3vw, 40px); }
.card {
  display: block; width: 100%; min-width: 0; padding: 0; border: 0; background: none; text-align: left; cursor: zoom-in;
  opacity: 0; transform: translateY(34px);
  transition: opacity .8s ease calc(var(--n, 0) * 80ms), transform .9s var(--ease-out) calc(var(--n, 0) * 80ms);
}
.card.is-in { opacity: 1; transform: none; }
.card .phone { transition: box-shadow .5s ease, transform .6s var(--ease-out); }
.card.is-hot .phone { transform: translateY(-8px); }
@media (hover: hover) { .card:hover .phone { transform: translateY(-8px); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tier) 55%, transparent), 0 44px 80px -36px rgba(0, 0, 0, .85), 0 26px 110px -26px color-mix(in srgb, var(--tier) 60%, transparent); } }
.card { -webkit-tap-highlight-color: transparent; -webkit-user-select: none; user-select: none; }
.card-meta { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 10px; padding: 16px 4px 0; }
.card-name { font: 600 1.3rem/1.2 var(--font-display); flex: 1 1 100%; overflow-wrap: anywhere; }
.card-info { display: flex; align-items: center; gap: 10px; margin-top: 8px; color: var(--ivory-70); font-size: .93rem; }
.card-price { color: var(--ivory); font-weight: 600; font-size: .95rem; margin-top: 8px; white-space: nowrap; }
.empty { padding: 56px 24px; border: 1px dashed var(--ivory-14); border-radius: 24px; text-align: center; color: var(--ivory-70); }

/* ----------------------------------------------------------------- narxlar */

.plans { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(16px, 2.4vw, 28px); }
.plan {
  position: relative; isolation: isolate; padding: clamp(26px, 4vw, 46px); border-radius: 30px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--tier) 9%, var(--lapis-800)), var(--lapis-800) 62%);
  border: 1px solid color-mix(in srgb, var(--tier) 28%, transparent);
  display: flex; flex-direction: column; align-items: flex-start;
}
/* VIP: tilla hoshiya aylanib turadi */
.plan[data-tier="vip"] { border-color: transparent; }
.plan[data-tier="vip"]::before {
  content: ""; position: absolute; z-index: -1; inset: -1px; border-radius: inherit; padding: 1.5px;
  background: conic-gradient(from var(--ang), transparent 0 55%, var(--tilla) 78%, #FFF2CF 86%, var(--tilla) 92%, transparent);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
          mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  animation: orbit 7s linear infinite;
}
@keyframes orbit { to { --ang: 360deg; } }
.plan h3 { display: inline-flex; align-items: center; gap: .45em; font: 600 1.6rem/1 var(--font-display); color: var(--tier); }
.plan h3 svg { width: .8em; height: .8em; fill: currentColor; }
.plan-price { margin-top: 18px; color: var(--ivory-70); font-size: 1.1rem; }
.plan-price b { font: 600 clamp(3rem, 7vw, 4.6rem)/1 var(--font-display); color: var(--ivory); letter-spacing: -.01em; margin-right: .1em; }
.plan-list { margin: 26px 0 30px; display: grid; gap: 12px; }
.plan-list li { position: relative; padding-left: 28px; color: var(--ivory-70); }
.plan-list li::before { content: ""; position: absolute; left: 4px; top: .55em; width: 9px; height: 9px; background: var(--tier); rotate: 45deg; }
.plan .btn { margin-top: auto; }

/* ----------------------------------------------------------------- qadamlar */

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(22px, 4vw, 56px); counter-reset: step; }
.steps li { counter-increment: step; padding-top: 22px; border-top: 1px solid var(--ivory-14); }
.steps li::before {
  content: counter(step); display: block; font: 600 clamp(3.4rem, 7vw, 5rem)/.9 var(--font-display);
  color: transparent; -webkit-text-stroke: 1px var(--ivory-45); margin-bottom: 18px;
}
.steps h3 { font: 600 1.4rem/1.2 var(--font-display); }
.steps p { margin-top: 8px; color: var(--ivory-70); max-width: 34ch; }

/* ------------------------------------------------------------------- past */

.foot { width: var(--page); margin: clamp(80px, 11vw, 140px) auto 0; padding: 30px 0 calc(34px + env(safe-area-inset-bottom)); border-top: 1px solid var(--ivory-14); display: flex; flex-wrap: wrap; align-items: center; gap: 16px 34px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 26px; margin-left: auto; }
.foot-links a { color: var(--ivory-70); text-decoration: none; font-weight: 500; }
.foot-links a:hover { color: var(--ivory); text-decoration: underline; text-underline-offset: 4px; }
.foot-note { flex: 1 1 100%; color: var(--ivory-45); font-size: .9rem; }

/* ------------------------------------------------------------ ko'rish oynasi */

.viewer { width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(5, 8, 25, .88); color: inherit; backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px); }
.viewer::backdrop { background: none; }
.viewer[open] { animation: veil .35s ease; }
@keyframes veil { from { opacity: 0; } }
.viewer-body { height: 100%; display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 420px); gap: clamp(20px, 4vw, 64px); width: min(1040px, 100% - 48px); margin: 0 auto; padding: 28px 0; }
.viewer-stage { container-type: size; display: grid; place-items: center; min-height: 0; }
.viewer-stage .phone { width: min(100cqw, 100cqh * .475, 420px); }
.viewer[open] .viewer-stage .phone { animation: lift .7s var(--ease-out); }
@keyframes lift { from { transform: translateY(40px) scale(.94); opacity: 0; } }
.viewer-side { position: relative; align-self: center; max-height: 100%; overflow: auto; padding: 4px 4px 4px 0; scrollbar-width: thin; }
.viewer-close { position: absolute; top: 0; right: 4px; z-index: 2; }
.pane { display: grid; justify-items: start; gap: 0; padding-right: 52px; }
#paneForm, #paneDone { padding-right: 4px; }
.viewer-name { font: 600 clamp(1.8rem, 3.4vw, 2.6rem)/1.1 var(--font-display); margin-top: 14px; overflow-wrap: anywhere; }
.viewer-cat { color: var(--ivory-70); margin-top: 6px; }
.viewer-price { margin-top: 22px; color: var(--ivory-70); }
.viewer-price b { font: 600 2.6rem/1 var(--font-display); color: var(--ivory); }
.viewer-list { margin: 22px 0 28px; }
.viewer-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.back { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px 0 6px; margin-left: -6px; border: 0; border-radius: 99px; background: none; color: var(--ivory-70); font-weight: 500; }
.back:hover { color: var(--ivory); }
.back svg { width: 20px; height: 20px; }
.form-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 10px 0 22px; color: var(--ivory-70); }
.field { display: grid; gap: 7px; width: 100%; margin-bottom: 16px; }
.field > span { font-size: .93rem; font-weight: 500; color: var(--ivory-70); }
.field i { font-style: normal; color: var(--ivory-45); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 52px; padding: 13px 16px; border-radius: 14px; border: 1px solid var(--ivory-14); background: rgba(246, 240, 226, .05);
  color: var(--ivory); font-size: 1rem; transition: border-color .2s, background-color .2s; color-scheme: dark;
}
.field textarea { resize: vertical; min-height: 96px; }
.field select { appearance: none; -webkit-appearance: none; padding-right: 40px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23F6F0E2' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M7 10l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 20px; }
.field select option { background: var(--lapis-800); color: var(--ivory); }
.field input::placeholder, .field textarea::placeholder { color: var(--ivory-45); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--ivory); background: rgba(246, 240, 226, .09); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; width: 100%; }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-error { width: 100%; margin-bottom: 14px; padding: 12px 16px; border-radius: 14px; background: rgba(240, 113, 138, .12); border: 1px solid rgba(240, 113, 138, .5); color: #FFD3DB; }
#paneForm .btn-primary { width: 100%; }
.done-mark { width: 62px; height: 62px; fill: none; stroke: var(--tilla); stroke-width: 1; animation: turn 14s linear infinite; }
.done-text { margin: 12px 0 26px; color: var(--ivory-70); }

/* Shablon hali yo'q: sahna yashiriladi, matn markazda qoladi */
.hero.is-empty { display: block; min-height: 0; padding: 150px 0 40px; text-align: center; }
.hero.is-empty .stage-wrap { display: none; }
.hero.is-empty .hero-copy { width: var(--page); margin: 0 auto; }
.hero.is-empty .hero-title, .hero.is-empty .hero-text { margin-left: auto; margin-right: auto; }
.hero.is-empty .hero-actions, .hero.is-empty .hero-prices { justify-content: center; }
.hero.is-empty::before { left: 50%; bottom: 14%; translate: -50% 0; width: min(880px, 150vw); opacity: .75; }

/* Keng ekran: matn chapda, jonli sahna o'ngda — telefonlar birinchi ekranda to'liq ko'rinadi */
@media (min-width: 1000px) {
  .hero {
    --pw: min(19.5vw, 272px, (100svh - 250px) / 2.104);
    display: grid; grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr); align-items: center; column-gap: 12px;
    min-height: min(100svh, 940px); padding: 92px 0 36px max(20px, calc((100% - 1180px) / 2)); text-align: left;
  }
  .hero::before { left: 71%; bottom: 50%; translate: -50% 50%; width: min(1100px, 80vw); }
  .hero-copy { width: auto; margin: 0; }
  .hero-title { margin: 0; font-size: clamp(2.7rem, 4.75vw, 4.5rem); max-width: 11ch; }
  .hero-text { margin-left: 0; max-width: 42ch; }
  .hero-actions { justify-content: flex-start; }
  .hero-prices { justify-content: flex-start; flex-basis: 100%; }
  .stage-wrap { margin: 0; min-width: 0; }
  .stage { margin: -30px 0; padding: 30px 0; box-sizing: content-box; overflow: clip; overflow-clip-margin: 30px;
    -webkit-mask: linear-gradient(90deg, transparent, #000 13%, #000 87%, transparent); mask: linear-gradient(90deg, transparent, #000 13%, #000 87%, transparent); }
  .slide { top: 30px; }
}

/* ---------------------------------------------------------------- mobil */

@media (max-width: 860px) {
  .top-nav { display: none; }
  .top-cta { margin-left: auto; }
  .hero { --pw: min(56vw, 250px); --shift: calc(var(--pw) * 1.08); padding-top: 96px; }
  .stage-wrap { margin-top: 34px; }
  .filters { justify-items: start; width: 100%; }
  .chips { justify-content: flex-start; }
  .plans { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .foot-links { margin-left: 0; flex-basis: 100%; }

  .viewer-body { display: flex; flex-direction: column; gap: 14px; width: 100%; padding: 0; }
  .viewer-stage { flex: 1; padding: calc(14px + env(safe-area-inset-top)) 16px 0; }
  .viewer-side { align-self: stretch; flex: none; max-height: none; padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); background: var(--lapis-800); border-top: 1px solid var(--ivory-14); border-radius: 24px 24px 0 0; }
  .viewer-close { position: fixed; top: calc(12px + env(safe-area-inset-top)); right: 12px; background: rgba(8, 13, 43, .8); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
  .pane { padding-right: 0; }
  #paneInfo { grid-template-columns: 1fr auto; align-items: center; column-gap: 12px; }
  #paneInfo .tier { grid-column: 1; }
  #paneInfo .viewer-name { grid-column: 1; font-size: 1.5rem; margin-top: 6px; }
  #paneInfo .viewer-cat, #paneInfo .viewer-list, #paneInfo #viewerFull { display: none; }
  #paneInfo .viewer-price { grid-column: 2; grid-row: 1 / span 2; margin: 0; text-align: right; }
  #paneInfo .viewer-price b { display: block; font-size: 1.8rem; }
  #paneInfo .viewer-actions { grid-column: 1 / -1; justify-self: stretch; margin-top: 14px; }
  #paneInfo .viewer-actions .btn { width: 100%; }
  /* Buyurtma shakli ochilganda butun ekranni egallaydi */
  .viewer.is-form .viewer-stage { display: none; }
  .viewer.is-form .viewer-side { flex: 1; overflow: auto; border-radius: 0; border-top: 0; padding-top: calc(64px + env(safe-area-inset-top)); }
}
@media (max-width: 520px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card-name { font-size: 1.12rem; }
  .card-price { flex-basis: 100%; margin-top: 4px; }
  .seg { width: 100%; }
  .seg button { flex: 1; justify-content: center; padding: 0 8px; flex-direction: column; gap: 0; min-height: 52px; line-height: 1.2; }
  .seg button svg { display: none; }
  .hero-actions .btn { width: min(100% - 40px, 340px); }
  .field-row { grid-template-columns: 1fr; gap: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  .card { opacity: 1; transform: none; }
}
