/* ===== Bosh sahifa: ikki tanlov ===== */
body.home {
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}

/* Loader */
.loader {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 18px;
  background: var(--dark);
  color: var(--paper);
}

.odo {
  display: flex;
  font-family: var(--serif);
  font-size: clamp(90px, 16vw, 200px);
  line-height: 1;
  height: 1em;
  overflow: hidden;
}
.odo__col { display: flex; flex-direction: column; align-self: flex-start; }
.odo__col span { display: block; height: 1em; text-align: center; }

.loader__cap {
  font: 10.5px/1 var(--mono);
  letter-spacing: .2em;
  text-transform: uppercase;
  color: rgba(244, 242, 237, .45);
}

/* Loader paytida qavslar "19" atrofida turadi, keyin ekran chetiga kengayadi */
.frame--home { inset: auto; left: 50%; top: 50%; width: 0; height: 0; }
.is-loading .frame__c { border-color: var(--paper); }
.frame__c { transition: border-color .6s; }

/* Burchaklar */
.ui { position: fixed; z-index: 5; display: grid; gap: 2px; }
.ui--tl { top: var(--gutter); left: var(--gutter); display: flex; align-items: center; gap: 12px; }
.ui--tr { top: var(--gutter); right: var(--gutter); display: grid; justify-items: end; gap: 10px; }
.ui__clock { text-align: right; }
.ui--bl { bottom: calc(var(--gutter) + 26px); left: var(--gutter); }

.brand__num { font-family: var(--serif); font-size: 44px; line-height: 1; }

/* Sirli belgi: katta va ko'zga tashlanadi, lekin nimaligi yozilmagan */
.seal {
  position: fixed;
  right: var(--gutter);
  bottom: calc(var(--gutter) + 18px);
  z-index: 7;
  width: clamp(92px, 9vw, 128px);
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  outline: none;
}
.seal svg { display: block; width: 100%; height: 100%; overflow: visible; }
.seal text { font: 500 9.6px var(--mono); letter-spacing: .22em; fill: currentColor; }
.seal__ring { transform-origin: 60px 60px; animation: sealSpin 22s linear infinite; }
.seal__core { transform-origin: 60px 60px; transition: transform .8s var(--ease-out); }
.seal__core path { fill: none; stroke: var(--accent); stroke-width: 2.2; stroke-linecap: round; }
.seal:hover .seal__ring { animation-duration: 5s; }
.seal:hover .seal__core { transform: rotate(90deg) scale(1.15); }
.seal:focus-visible { outline: 1px dashed var(--accent); outline-offset: 6px; border-radius: 50%; }
@keyframes sealSpin { to { transform: rotate(360deg); } }

.field__toggle { background: none; border: 0; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

.ask {
  position: fixed;
  left: calc(50% + 18px);
  top: calc(72dvh + 22px);
  white-space: nowrap;
}

/* Chiziqlar */
.lines {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.line {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.25;
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transition: stroke .45s, stroke-width .45s, opacity .45s;
}

body[data-focus="left"]  #branchRight,
body[data-focus="right"] #branchLeft { opacity: .15; }
body[data-focus="left"]  #branchLeft,
body[data-focus="right"] #branchRight { stroke-width: 2; }
body[data-picked="left"]  #branchLeft,
body[data-picked="right"] #branchRight,
body.has-choice #trunk { stroke: var(--accent); }

.dot { fill: var(--ink); opacity: 0; transition: fill .4s; }
body.has-choice .dot { fill: var(--accent); }
.pulse { fill: none; stroke: var(--accent); stroke-width: 1; opacity: 0; }

/* Tanlovlar */
.choice {
  position: fixed;
  top: 30dvh;
  z-index: 6;
  background: none;
  border: 0;
  font: inherit;
  color: inherit;
  display: grid;
  gap: 14px;
  padding: 10px 0;
  outline: none;
  touch-action: manipulation;
  transition: opacity .5s, color .45s;
}

.choice--left  { left: var(--gutter); text-align: left; }
.choice--right { right: var(--gutter); text-align: right; }
.choice--right .choice__num { justify-self: end; }

.choice__label {
  font-family: var(--serif);
  font-size: clamp(34px, 6.4vw, 96px);
  line-height: .98;
  letter-spacing: -.01em;
}
.choice__label em { font-style: italic; }

.choice:hover .ch__a,
.choice:focus-visible .ch__a { transform: translateY(-125%); }
.choice:hover .ch__b,
.choice:focus-visible .ch__b { transform: none; }

.choice__num { transition: color .45s; }
.choice:hover .choice__num { color: var(--ink); }

body[data-focus="left"]  .choice--right,
body[data-focus="right"] .choice--left { opacity: .22; }

.choice.is-selected,
.choice.is-selected .choice__num { color: var(--accent); }

.choice__go { display: none; }

/* Ticker */
.ticker {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 5;
  height: 30px;
  padding-bottom: env(safe-area-inset-bottom);
  display: flex;
  align-items: center;
  overflow: hidden;
  border-top: 1px solid var(--hair);
  color: var(--ink);
}
.ticker__track { display: flex; gap: 22px; padding-right: 22px; white-space: nowrap; will-change: transform; }
.ticker b { font-weight: 400; color: var(--accent); }

/* Telefon: tanlovlar bosiladigan karta ko'rinishida */
@media (max-width: 640px) {
  .brand__num { font-size: 36px; }
  .ui--tr { gap: 8px; }
  .ui__clock span:first-child { display: none; }
  .ui--bl { display: none; }

  .choice {
    top: 27dvh;
    width: calc((100vw - 2 * var(--gutter) - 12px) / 2);
    min-height: 168px;
    padding: 16px 16px 18px;
    gap: 10px;
    align-content: space-between;
    text-align: left;
    background: rgba(244, 242, 237, .92);
    border: 1px solid var(--line);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(20, 20, 20, .06);
    transition: opacity .5s, color .45s, transform .25s var(--ease-out), border-color .3s, background .3s;
  }
  .choice:active { transform: scale(.96); }
  .choice--right { text-align: left; }
  .choice--right .choice__num { justify-self: start; }
  .choice__label { font-size: clamp(27px, 8.2vw, 36px); line-height: 1; }
  .choice__go {
    display: grid;
    place-items: center;
    position: absolute;
    right: 12px;
    top: 12px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--ink);
    color: var(--paper);
    font: 15px/1 var(--mono);
  }
  .choice.is-selected { border-color: var(--accent); background: var(--paper); }
  .choice.is-selected .choice__go { background: var(--accent); }

  .ask { top: calc(72dvh + 14px); }
  .seal { width: 84px; bottom: calc(30px + 14px); right: 16px; }
}

@media (max-width: 640px) {
  @supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .choice {
      background: rgba(244, 241, 234, .55);
      -webkit-backdrop-filter: blur(14px) saturate(1.3);
      backdrop-filter: blur(14px) saturate(1.3);
    }
  }
}


/* Rangsiz tanlov: tanlangan yo'l qalinlashadi, nuqta va to'lqin qora */
body.has-choice #trunk,
body[data-picked="left"] #branchLeft,
body[data-picked="right"] #branchRight { stroke: var(--ink); stroke-width: 2; }
body.has-choice .dot { fill: var(--ink); }
.pulse { stroke: var(--ink); }
.choice.is-selected, .choice.is-selected .choice__num { color: var(--ink); }
.ticker b { color: var(--muted); }
.seal__core path { stroke: var(--ink); }
.seal:focus-visible { outline-color: var(--ink); }
@media (max-width: 640px) {
  .choice.is-selected { border-color: var(--ink); }
  .choice.is-selected .choice__go { background: var(--ink); }
}


/* Tanlangan yo'l, nuqta va to'lqin — sabzi rangda */
body.has-choice #trunk,
body[data-picked="left"] #branchLeft,
body[data-picked="right"] #branchRight { stroke: var(--accent); }
body.has-choice .dot { fill: var(--accent); }
.pulse { stroke: var(--accent); }
.choice.is-selected, .choice.is-selected .choice__num { color: var(--accent); }
.ticker b { color: var(--accent); }
.seal__core path { stroke: var(--accent); }
.loader__cap { color: var(--accent-soft); }
.odo__col:last-child { color: var(--accent); }
@media (max-width: 640px) {
  .choice.is-selected { border-color: var(--accent); }
  .choice.is-selected .choice__go { background: var(--accent); }
  .choice__go { background: var(--ink); }
}


/* ===== Ko'rsatkich: kompas ignasi + shkala (tepada, o'rtada) ===== */
.vane {
  --vh: min(25dvh, 210px);
  position: fixed;
  top: max(10px, 2.5dvh);
  left: calc(50% - var(--vh) * 260 / 196 / 2);
  z-index: 6;
  width: calc(var(--vh) * 260 / 196);
  height: var(--vh);
  pointer-events: none;
}
.vane svg { display: block; width: 100%; height: 100%; overflow: visible; }

.vane__arc { fill: none; stroke: var(--ink); stroke-width: .8; stroke-dasharray: 1 5; opacity: .35; }
.vane__ticks line { stroke: var(--ink); stroke-width: 1; stroke-linecap: round; }
.vane__lbl { font: 500 9px var(--mono); letter-spacing: .14em; fill: var(--muted); transition: fill .4s; }
.vane__lbl.is-on { fill: var(--accent); }

.vane__tail { stroke: var(--ink); stroke-width: 1.2; stroke-linecap: round; }
.vane__weight { fill: var(--paper); stroke: var(--ink); stroke-width: 1.2; }
.vane__shaft { stroke: var(--ink); stroke-width: 1.2; stroke-linecap: round; }
.vane__head { fill: var(--accent); stroke: var(--accent); stroke-width: 1; stroke-linejoin: round; }
.vane__bead { fill: var(--ink); }
.vane__ghost line { stroke: var(--accent); stroke-width: 1; }
.vane__ghost path { fill: var(--accent); }
.vane__ghost { opacity: 0; }

.vane__orbit {
  fill: none;
  stroke: var(--ink);
  stroke-width: .9;
  stroke-dasharray: 2.5 4;
  transform-origin: 130px 30px;
  transform-box: view-box;
  animation: orbitSpin 9s linear infinite;
}
body[data-focus] .vane__orbit { animation-duration: 2.2s; stroke: var(--accent); }
@keyframes orbitSpin { to { transform: rotate(360deg); } }

.vane__knob { fill: rgba(244, 241, 234, .75); stroke: var(--ink); stroke-width: 1.2; }
.vane__pin { fill: var(--accent); }
.vane__pulse { fill: none; stroke: var(--accent); stroke-width: 1; opacity: 0; }

body.has-choice .vane__shaft,
body.has-choice .vane__tail { stroke: var(--accent); }

@media (max-width: 640px) {
  .vane { --vh: min(18dvh, 140px); top: 58px; }
}
