/* =====================================================================
   TELEFON VERSIYASI
   Sayt asosan telefondan ko'riladi: bu fayl kichik ekranlar uchun
   joylashuv, o'lcham va boshqaruvni alohida sozlaydi.
   (Kompyuter ko'rinishiga ta'sir qilmaydi.)
   ===================================================================== */

.m-only { display: none !important; }
.calc-mini, .ex-nav { display: none; }

@media (max-width: 820px) {
  .m-only { display: revert !important; }
  html { -webkit-tap-highlight-color: rgba(232, 163, 61, .18); }
  body { overflow-x: clip; }
  main { overflow-x: clip; }

  /* ---------- Bo'limlar ---------- */
  .section { padding-block: clamp(64px, 16vw, 96px); }
  .sec-head { gap: 14px; margin-bottom: 36px; }
  .sec-title { font-size: clamp(2.1rem, 10vw, 3rem); }
  .sec-lead { font-size: 1.06rem; line-height: 1.6; }

  /* ---------- Navigatsiya ---------- */
  .nav { gap: 8px; padding: calc(10px + env(safe-area-inset-top, 0px)) 14px 10px; }
  .logo { gap: 8px; min-width: 0; }
  .logo-word { font-size: 1rem; }
  .nav-right { gap: 8px; }
  .lang { padding: 2px; }
  .lang button { min-width: 36px; height: 36px; padding: 0 8px; font-size: .78rem; }
  .burger { width: 44px; height: 44px; flex: none; }
  .nav-links { top: calc(100% + 6px); left: 10px; right: 10px; padding: 8px; max-height: calc(100svh - 90px); overflow: auto; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .8); }
  .nav-links a { color: var(--fg); padding: 15px 16px; border-radius: 12px; font-size: 1.05rem; }
  .nav-links a.active { background: var(--faint); }
  .m-extra { display: grid !important; gap: 8px; padding: 10px 6px 6px; margin-top: 6px; border-top: 1px solid var(--faint); }
  .m-extra .m-cta { justify-content: center; color: var(--night); background: var(--oltin); min-height: 52px; font-size: 1rem; }
  .m-extra .m-cta:hover { color: var(--night); background: #F2B85A; }
  .m-sound { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--faint); background: transparent; color: var(--fg); font-weight: 600; font-size: .95rem; cursor: pointer; text-align: left; }
  .m-sound .eq { width: 30px; height: 30px; border-radius: 50%; background: var(--night); display: flex; align-items: flex-end; justify-content: center; gap: 2px; padding: 8px 0; flex: none; }
  .m-sound .eq i { width: 3px; height: 14px; border-radius: 2px; background: var(--oltin); transform: scaleY(.45); transform-origin: bottom; }
  .m-sound[aria-pressed="true"] { background: var(--oltin); color: var(--night); border-color: var(--oltin); }
  .m-sound[aria-pressed="true"] .eq { background: var(--ivory); }
  .m-sound[aria-pressed="true"] .eq i { background: var(--night); animation: eq .9s ease-in-out infinite; }
  .m-sound[aria-pressed="true"] .eq i:nth-child(2) { animation-delay: .15s; }
  .m-sound[aria-pressed="true"] .eq i:nth-child(3) { animation-delay: .3s; }
  .m-sound[aria-pressed="true"] .eq i:nth-child(4) { animation-delay: .45s; }

  /* ---------- Bosh ekran ---------- */
  .hero { height: 220vh; height: 220svh; }
  .hero-pin { padding: 76px var(--gutter) calc(18px + env(safe-area-inset-bottom, 0px)); grid-template-rows: minmax(0, 1fr) auto; align-items: end; }
  .hero-copy { padding-top: 0; gap: 14px; }
  .hero-title { font-size: clamp(2.15rem, 11vw, 3.3rem); }
  .hero-lead { font-size: 1rem; line-height: 1.55; }
  .hero-ctas { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; margin-top: 4px; }
  .hero-ctas .btn { justify-content: center; min-height: 50px; font-size: .98rem; }
  .greet { font-size: .82rem; padding: 6px 12px 6px 10px; gap: 4px 8px; line-height: 1.35; animation-delay: 1s; }
  .build { margin-top: 14px; gap: 6px; }

  /* ---------- Asoschilar va xizmatlar ---------- */
  .founder .portrait { max-width: 190px; }
  .chips li { font-size: .8rem; padding: 5px 11px; }
  .svc-list li { column-gap: 16px; }

  /* ---------- Eksponatlar: surib ko'riladigan karusel ---------- */
  .exhibits { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
    margin-inline: calc(var(--gutter) * -1); padding: 6px var(--gutter) 18px; scroll-padding-inline: var(--gutter); scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .exhibits::-webkit-scrollbar { display: none; }
  .exhibit, .exhibit.wide { flex: 0 0 86%; scroll-snap-align: start; grid-column: auto; }
  .exhibit .vitrine, .exhibit.wide .vitrine { aspect-ratio: 4 / 3.3; }
  .plaque { margin: 16px 2% 0; gap: 8px; }
  .plaque h3 { font-size: 1.3rem; }
  .plaque p { font-size: .92rem; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
  .plaque dl { display: none; }
  .plaque .btn { min-height: 46px; padding: 0 20px; font-size: .9rem; }
  .vitrine-cta { display: none; }
  .ex-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 4px; }
  .ex-count { font-family: var(--display); font-weight: 600; font-size: .95rem; color: var(--ink); font-variant-numeric: tabular-nums; }
  .ex-dots { display: flex; gap: 6px; flex: 1; justify-content: center; }
  .ex-dots i { width: 7px; height: 7px; border-radius: 4px; background: rgba(26, 42, 102, .2); transition: width .3s, background-color .3s; }
  .ex-dots i.on { width: 22px; background: var(--hall-lapis); }
  .ex-arrows { display: flex; gap: 8px; }
  .ex-arrows button { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--ink-line); background: #fff; color: var(--ink); display: grid; place-items: center; cursor: pointer; }
  .ex-arrows button:disabled { opacity: .35; }
  .ex-arrows svg { width: 18px; height: 18px; }
  .ex-arrows .prev svg { transform: rotate(180deg); }

  /* ---------- Loyiha tarixi ---------- */
  .case-grid { gap: 32px; }
  .case { padding-top: 24px; }
  .case-title { font-size: clamp(1.7rem, 8vw, 2.2rem); }
  .case-shots, .case-shots.two { min-height: 0; display: flex; justify-content: center; gap: 4%; padding: 10px 0 20px; }
  .case-shots .shot, .case-shots.two .s1, .case-shots.two .s2 { position: static; width: 44%; border-width: 5px; border-radius: 20px; }
  .case-shots.two .s1 { transform: rotate(-4deg) translateY(6px); }
  .case-shots.two .s2 { transform: rotate(4deg) translateY(-6px); }
  .cstep { grid-template-columns: 40px minmax(0, 1fr); gap: 12px; }
  .cstep-n { font-size: 1.15rem; }
  .case .btn-gold { width: 100%; justify-content: center; min-height: 50px; }

  /* ---------- O'yinxona ---------- */
  .gcard-art { aspect-ratio: 16 / 9; }
  .gcard-body { padding: 18px 18px 20px; }
  .gcard h3 { font-size: 1.4rem; }
  .gcard-row .btn { flex: 1; justify-content: center; min-height: 50px; }
  .learn { padding: 18px; }
  .learn li { font-size: .9rem; }

  /* ---------- AI ofis ---------- */
  .office-clock { font-size: .72rem; padding: 4px 9px; }

  /* ---------- Narxlar ---------- */
  .menu-card { padding: 22px 18px; border-radius: 22px; }
  .menu-card::after { inset: 7px; border-radius: 16px; }
  .menu-top { margin-bottom: 14px; }
  .menu-grp { margin-bottom: 6px; }
  .menu-grp summary { list-style: none; cursor: pointer; }
  .menu-grp summary::-webkit-details-marker { display: none; }
  .menu-grp h3 { margin-bottom: 0; padding: 14px 34px 12px 0; border-bottom: 1px solid rgba(36, 21, 14, .18); position: relative; font-size: 1.15rem; }
  .menu-grp h3::after { content: ""; position: absolute; right: 6px; top: 50%; width: 10px; height: 10px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-70%) rotate(45deg); transition: transform .25s; }
  .menu-grp[open] h3 { border-bottom: 2px solid var(--night); margin-bottom: 12px; }
  .menu-grp[open] h3::after { transform: translateY(-30%) rotate(-135deg); }
  .menu-grp ul { padding-bottom: 12px; }
  .mi-row { flex-wrap: wrap; }
  .mi-row b { font-size: 1rem; }
  .menu-grp li p { font-size: .82rem; }
  .calc { margin-top: 48px; gap: 22px; }
  .calc-title { font-size: clamp(1.8rem, 8.5vw, 2.4rem); }
  .ctype { min-height: 76px; padding: 12px; }
  .calc-range input { height: 40px; }
  .cextra, .cspeed { min-height: 46px; }
  .calc-sum { padding: 22px; }
  .calc-mini.off { opacity: 0; transform: translateY(12px); pointer-events: none; }
  .calc-mini { transition: opacity .25s, transform .25s; }
  .calc-mini { display: flex; position: sticky; bottom: calc(10px + env(safe-area-inset-bottom, 0px)); z-index: 5; align-items: center; gap: 12px; margin-top: 6px;
    background: var(--ivory); color: var(--night); border-radius: 18px; padding: 10px 10px 10px 16px; box-shadow: 0 20px 40px -12px rgba(0, 0, 0, .85); }
  .calc-mini div { flex: 1; min-width: 0; display: grid; line-height: 1.25; }
  .calc-mini small { font-size: .72rem; color: #9A5B16; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
  .calc-mini b { font-family: var(--display); font-size: .98rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .calc-mini span { font-size: .78rem; color: rgba(36, 21, 14, .7); }
  .calc-mini button { border: 0; border-radius: 999px; background: var(--night); color: var(--ivory); font: inherit; font-weight: 700; font-size: .88rem; padding: 0 16px; min-height: 46px; cursor: pointer; white-space: nowrap; }

  /* ---------- Jarayon ---------- */
  .steps { row-gap: 32px; }

  /* ---------- Blog ---------- */
  .post-btn { grid-template-columns: 96px minmax(0, 1fr); border-radius: 18px; }
  .post.big .post-btn { grid-template-rows: 170px auto; }
  .post.big .post-cover svg { width: 64px; height: 64px; }
  .post-body { padding: 16px; gap: 8px; }
  .post-meta { font-size: .72rem; }
  .post-title { font-size: .98rem; }
  .post.big .post-title { font-size: 1.3rem; }
  .blog-channel .btn { width: 100%; justify-content: center; }

  /* ---------- Mehmonlar daftari ---------- */
  .gb-grid { gap: 28px; }
  .gb-form { padding: 18px; }
  .gb-form .btn { width: 100%; justify-content: center; min-height: 50px; }
  .gb-page { transform: none; }

  /* ---------- Aloqa: avval ariza, keyin kontaktlar ---------- */
  .contact-grid { gap: 22px; }
  .contact-copy { display: contents; }
  .contact-title { order: 1; font-size: clamp(2.2rem, 11vw, 3rem); }
  .contact-copy > .sec-lead { order: 2; }
  .contact-box { order: 3; }
  .channels { order: 4; margin-top: 8px; }
  .channels li { grid-template-columns: 82px minmax(0, 1fr) auto; gap: 10px; padding: 10px 0; }
  .channels .copy { min-height: 40px; padding: 0 12px; font-size: .78rem; }
  .brief { min-height: 0; padding: 20px 16px; }
  .bf-q { font-size: 1.35rem; }
  .bf-nav .btn { min-height: 50px; }
  .ctabs button { font-size: .88rem; }
  .form .btn { width: 100%; justify-content: center; min-height: 50px; }

  /* ---------- Suzuvchi tugmalar ---------- */
  .sound-pill { display: none !important; }
  .tea { right: max(12px, env(safe-area-inset-right)); bottom: max(12px, env(safe-area-inset-bottom)); }
  .tea.in-hero, .tea.in-zone { opacity: 0; transform: translateY(20px); pointer-events: none; }
  .tea-pot { width: 54px; height: 54px; }
  .tea-ico { width: 28px; height: 24px; }
  .tea-card { position: fixed; left: 12px; right: 12px; bottom: calc(76px + env(safe-area-inset-bottom, 0px)); width: auto; }
  .tea-btns .btn { flex: 1; justify-content: center; min-height: 44px; }

  /* ---------- Footer ---------- */
  .foot-row { padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
  .foot-top { padding: 10px 0; }

  /* ---------- Oynalar ---------- */
  .bmodal { padding: 0; place-items: end stretch; }
  .bmodal-box { width: 100%; max-height: 94svh; border-radius: 22px 22px 0 0; }
  .pm-body { font-size: 1rem; }
  .pm-cta .btn { width: 100%; justify-content: center; }
}

@media (max-width: 380px) {
  .logo-word { font-size: .9rem; }
  .logo-star { width: 22px; height: 22px; }
  .lang button { min-width: 32px; padding: 0 6px; }
  .greet #greetS { display: none; }
  .ctype span { display: none; }
  .calc-mini b { font-size: .88rem; }
}
@media (max-width: 820px) and (max-height: 700px) {
  .greet #greetS { display: none; }
  .hero-lead { font-size: .94rem; }
  .hero-ctas .btn { min-height: 46px; }
}


/* =====================================================================
   TELEFON: gumbazga tepadan qarash (girih.js). Kompyuterga ta'sir qilmaydi.
   ===================================================================== */
.girih-wrap, .girih-deco { display: none; }
@media (max-width: 820px) {
  .has-girih .scene { display: none; }
  .has-girih .hero { background:
      radial-gradient(120% 60% at 50% 32%, rgba(70,182,201,.10), transparent 60%),
      radial-gradient(80% 40% at 50% 30%, rgba(232,163,61,.08), transparent 70%); }
  .has-girih .girih-wrap { display: block; position: absolute; left: 50%; top: 0; z-index: 0; pointer-events: none;
    transform-origin: 50% 50%; will-change: transform; }
  .has-girih .girih-wrap[hidden] { display: none; }
  .girih { width: 100%; height: 100%; display: block; overflow: visible; filter: drop-shadow(0 18px 40px rgba(0,0,0,.45)); }
  .has-girih .hero-copy { position: relative; z-index: 1; will-change: opacity, transform; text-shadow: none; }
  .has-girih .build { position: relative; z-index: 1; }
  .has-girih .contact { position: relative; overflow: clip; }
  .has-girih .girih-deco { display: block; position: absolute; width: 150vw; max-width: 760px; aspect-ratio: 1; right: -62vw; top: -18vw;
    opacity: .07; pointer-events: none; z-index: 0; animation: girihSpin 160s linear infinite; }
  .has-girih .contact > :not(.girih-deco) { position: relative; z-index: 1; }
}
@keyframes girihSpin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .girih-deco { animation: none !important; } }

/* =====================================================================
   TELEFON YOTIQ HOLATDA (keng, lekin past ekran): bosh ekran sig'ishi uchun
   ===================================================================== */
@media (min-width: 821px) and (max-height: 520px) {
  .hero-pin { padding-top: 70px; padding-bottom: 12px; align-items: end; }
  .hero-copy { gap: 10px; max-width: min(560px, 58vw); }
  .hero .greet { display: none; }
  .hero-title { font-size: clamp(1.9rem, 11.5vh, 3rem); }
  .hero-lead { font-size: .9rem; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .hero-ctas .btn { min-height: 42px; padding: 0 18px; font-size: .9rem; }
  .build { gap: 6px; margin-top: 8px; }
  .sound-pill .sound-txt { display: none; }
  .sound-pill { padding: 10px; }
}
@media (min-width: 821px) and (max-height: 520px) { .hero .build { padding-left: 60px; } }
@media (max-width: 820px) and (max-height: 520px) and (orientation: landscape) {
  .hero { height: 200svh; }
  .hero-pin { padding-top: 68px; padding-bottom: 10px; }
  .hero-copy { gap: 8px; }
  .hero .greet { display: none; }
  .hero-title { font-size: clamp(1.7rem, 10.5vh, 2.4rem); }
  .hero-lead { font-size: .86rem; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .hero-ctas { grid-template-columns: 1fr 1fr; gap: 8px; }
  .hero-ctas .btn { min-height: 42px; font-size: .88rem; }
  .build { margin-top: 8px; }
}

/* =====================================================================
   TELEFON: bo'limma-bo'lim sayqal (2-bosqich)
   ===================================================================== */
@media (max-width: 820px) {
  /* Asoschilar: ixcham "vizitka" ko'rinishi, rasm ism yonida */
  .founders { gap: 0; }
  .founder { grid-template-columns: 96px minmax(0, 1fr); column-gap: 20px; row-gap: 12px; align-items: end; padding: 28px 0; }
  .founder + .founder { border-top: 1px solid var(--faint); }
  .founder:first-child { padding-top: 8px; }
  .founder .portrait { grid-row: 1 / span 2; width: 96px; max-width: none; align-self: center; }
  .founder .portrait:hover { transform: none; }
  .portrait-mono { font-size: 1.85rem; }
  .portrait-frame { inset: -5px; width: calc(100% + 10px); height: calc(100% + 10px); }
  .founder-body { display: contents; }
  .founder-name { grid-column: 2; align-self: end; font-size: 1.45rem; }
  .founder-role { grid-column: 2; align-self: start; line-height: 1.4; }
  .founder-body > :not(.founder-name):not(.founder-role) { grid-column: 1 / -1; }
  .founder-link { min-height: 44px; }

  /* Aloqa: bosiladigan qatorlar katta, uzun email sig'adi */
  .contact a.v { display: inline-block; padding-block: 9px; overflow-wrap: anywhere; }

  /* Kalkulyator pastki paneli: muddat to'liq ko'rinadi */
  .calc-mini b { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-size: .92rem; line-height: 1.2; }

  /* Til tugmalari barmoq uchun qulayroq */
  .lang button { min-width: 38px; height: 38px; }

  /* Choy taymeri kontentni kamroq to'sadi */
  .tea-pot { width: 50px; height: 50px; }
}
@media (max-width: 380px) {
  .lang button { min-width: 32px; height: 36px; }
  .founder { grid-template-columns: 82px minmax(0, 1fr); column-gap: 16px; }
  .founder .portrait { width: 82px; }
  .founder-name { font-size: 1.3rem; }
}


/* =====================================================================
   TELEFON (3-bosqich): choy taymeri va narx menyusi olib tashlandi,
   o'rniga doim ko'rinadigan "Telegram'da yozing" tugmasi
   ===================================================================== */
.tg-fab { display: none; }
@media (max-width: 820px) {
  .tea, .tea-card { display: none !important; }
  .prices .sec-head, #menuBox { display: none !important; }
  .prices .calc { margin-top: 0; }
  .has-tgfab .tg-fab:not([hidden]) { display: inline-flex; }
  .tg-fab { position: fixed; z-index: 60; right: max(14px, env(safe-area-inset-right)); bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    align-items: center; gap: 9px; min-height: 52px; padding: 0 20px 0 16px; border-radius: 999px;
    background: var(--oltin); color: var(--night); font-weight: 700; font-size: .95rem; text-decoration: none;
    box-shadow: 0 14px 30px -10px rgba(0, 0, 0, .6), 0 0 0 1px rgba(36, 21, 14, .15);
    transition: opacity .25s, transform .25s; animation: fabIn .6s .8s backwards cubic-bezier(.2, .8, .2, 1); }
  .tg-fab .i { width: 20px; height: 20px; flex: none; }
  .tg-fab:active { transform: scale(.97); }
  .tg-fab.in-zone { opacity: 0; transform: translateY(20px); pointer-events: none; }
  .has-tgfab .hero-pin { padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px)); }
  .has-tgfab .footer { padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
}
@keyframes fabIn { from { opacity: 0; transform: translateY(24px); } }
@media (prefers-reduced-motion: reduce) { .tg-fab { animation: none; } }
@media (max-width: 820px) { #blog { display: none !important; } }
