/* ================================================================
   صفحه‌ی اصلی — یک صفحه‌ی کامل، بدون اسکرول در دسکتاپ
   چیدمان ۱۲ ستونی (چپ به راست): منو ۱ | sec2 ۳ | sec1 ۸
   ================================================================ */
html,body{height:100%}
body[data-page=home]{overflow:hidden}
.home{position:relative;z-index:2;height:100vh;min-height:620px;direction:ltr;display:grid;grid-template-columns:repeat(12,minmax(0,1fr));
  grid-template-rows:auto minmax(0,1fr) auto auto;column-gap:22px;padding:22px 22px 8px}
.home>*{direction:rtl}

/* ---------- سرتیتر کوچک بالا-چپ ---------- */
.hello{grid-column:2/5;grid-row:1;display:flex;flex-direction:column;gap:2px;padding-top:4px;min-height:58px}
.hello-k{font-size:12.5px;color:var(--ink-2);letter-spacing:.02em}
.hello-d{font-size:15px;font-weight:600}

/* ================================================================
   sec2
   ================================================================ */
.sec2{grid-column:2/5;grid-row:2/4;display:flex;flex-direction:column;align-items:flex-start;min-height:0;padding-top:clamp(4px,2vh,26px)}
.sec2 .pill{margin-bottom:clamp(10px,2.2vh,22px)}
.headline{font-size:clamp(30px,3.05vw,48px);line-height:1.18;font-weight:600;letter-spacing:-.01em;text-shadow:0 2px 24px rgba(0,0,0,.25)}
.headline span{display:block}
.headline span+span{font-weight:300;color:rgba(255,255,255,.92)}
.lede{animation:rv .9s .35s var(--ease-out) both;margin-top:clamp(10px,1.8vh,18px);font-size:13.5px;line-height:2;color:var(--ink-2);max-width:36ch}

/* عدد بزرگ با آیکن ادغام‌شده */
.now{position:relative;display:flex;align-items:flex-end;margin-top:clamp(6px,2.4vh,30px);width:100%}
.now-t{position:relative;z-index:2;font-weight:200;font-size:clamp(84px,8.6vw,138px);line-height:.86;letter-spacing:-.04em;direction:ltr;text-shadow:0 6px 40px rgba(0,0,0,.25)}
.now-t sup{font-size:.42em;font-weight:300;vertical-align:top;position:relative;top:.06em;margin-left:.02em}
.now-i{position:relative;z-index:1;width:clamp(76px,7.2vw,116px);margin:0 -14px 0 0;align-self:flex-start;transform:translateY(-14%);filter:drop-shadow(0 14px 22px rgba(0,0,0,.35));
  animation:floaty 7s ease-in-out infinite}
@keyframes floaty{50%{transform:translateY(-20%)}}
.now-s{display:flex;flex-direction:column;gap:2px;margin-right:auto;padding-bottom:10px;text-align:left;font-size:12.5px;color:var(--ink-2)}
.now-s>b{font-size:15px;color:#fff;font-weight:600}
.now-s span b{color:#fff;font-weight:600}

/* هفته (slop2): عدد بالا، موج در وسط، روز پایین */
.week{position:relative;width:100%;margin-top:auto;padding:10px 0 2px}
.week ol{position:relative;display:grid;grid-template-columns:repeat(7,1fr)}
.week li{min-width:0}
.week button{width:100%;display:flex;flex-direction:column;align-items:center;gap:0;padding:2px 0;color:var(--ink-2);transition:color .3s}
.week .wt{display:flex;align-items:center;gap:2px;font-size:clamp(14px,1.15vw,17px);font-weight:300;color:#fff;direction:ltr;white-space:nowrap}
.week .wt img{width:20px;height:20px}
.week .wn{font-size:10.5px;color:var(--ink-3);direction:ltr}
.week .gap{height:clamp(40px,6.4vh,58px)}
.week .wd{font-size:12.5px;font-weight:500}
.week .wd small{display:block;font-size:10px;font-weight:400;color:var(--ink-3);text-align:center}
.week button:hover{color:#fff}
.week li.on button{color:#fff}
.week li.on .wt{font-weight:600}
.week li.on .wd{font-weight:700}
.wave{position:absolute;left:0;right:0;top:44px;width:100%;height:clamp(40px,6.4vh,58px);overflow:visible;pointer-events:none}
.wave .ln{fill:none;stroke:rgba(255,255,255,.75);stroke-width:1.6;stroke-linecap:round;filter:drop-shadow(0 0 6px rgba(255,255,255,.35))}
.wave .ln.draw{stroke-dasharray:1;stroke-dashoffset:1;animation:draw 1.6s .3s var(--ease-out) forwards}
@keyframes draw{to{stroke-dashoffset:0}}
.wave .beam{stroke:url(#beamG);stroke-width:1.4}
.wave .spark{fill:#fff;filter:drop-shadow(0 0 6px #fff) drop-shadow(0 0 14px var(--gold))}

/* ================================================================
   sec1 — نقشه + باکس جزئیات
   ================================================================ */
.sec1{grid-column:5/13;grid-row:2;position:relative;min-height:0;direction:ltr}
.map{position:absolute;left:0;top:0;width:100%;height:100%;overflow:visible;transition:left .7s var(--ease),top .7s var(--ease),width .7s var(--ease),height .7s var(--ease)}
.map.noanim{transition:none}
@property --h{syntax:'<number>';inherits:true;initial-value:0}
.map{--h:0;--lift:-14px}
.map.up{animation:lift 1.1s forwards}
@keyframes lift{
  0%{--h:0;animation-timing-function:ease-in-out}
  42%{--h:1.32;animation-timing-function:ease-in-out}
  64%{--h:.82;animation-timing-function:ease-in-out}
  82%{--h:1.1;animation-timing-function:ease-in-out}
  100%{--h:1}}
#mapBase{filter:drop-shadow(0 1px 0 rgba(18,34,36,.6)) drop-shadow(0 16px 22px rgba(0,0,0,.3))}
#mapBase path{fill:rgba(255,255,255,.15);stroke:rgba(255,255,255,.72);stroke-width:var(--sw0,1.4px);stroke-linejoin:round;cursor:pointer;transition:fill .35s,stroke .35s}
#mapBase path:hover{fill:rgba(255,255,255,.3)}
#mapBase path:focus-visible{outline:none;stroke:var(--gold);stroke-width:calc(var(--sw0,1.4px) * 2.4)}
#mapBase path.hole{fill:rgba(8,16,18,calc(.42 * var(--h)));stroke:rgba(255,255,255,.35)}
#mapShadow path{fill:rgba(0,0,0,.55);filter:url(#lift);opacity:calc(var(--h) * .9);transform:translate(calc(var(--lift) * -.35 * var(--h)),calc(var(--lift) * -.5 * var(--h)));transform-box:fill-box}
#mapSel path{cursor:pointer;stroke-linejoin:round;transform-box:fill-box;transform-origin:50% 60%;
  transform:translateY(calc(var(--lift) * var(--h) * var(--f))) scale(calc(1 + .045 * var(--h) * var(--f)))}
#mapSel path.wall{fill:#9a6a2a;stroke:#7d531d;stroke-width:var(--sw0,1.4px)}
#mapSel path.top{fill:url(#goldTop);stroke:#fff6dd;stroke-width:calc(var(--sw0,1.4px) * 1.5);filter:drop-shadow(0 0 10px rgba(246,217,153,.45))}
#mapTxt text{fill:#fff;font-size:var(--fs,18px);font-weight:600;text-anchor:middle;pointer-events:none;paint-order:stroke;stroke:rgba(10,20,24,.55);stroke-width:var(--tsw,4px);stroke-linejoin:round}
#mapTxt text.sel{font-size:var(--fss,22px);font-weight:800;fill:#3a2508;stroke:rgba(255,240,205,.7);transform:translateY(calc(var(--lift) * var(--h)))}
.maphint{position:absolute;left:4px;top:2px;z-index:3;display:flex;align-items:center;gap:9px;padding:8px 14px;border-radius:var(--r-pill);font-size:12.5px;
  background:rgba(0,0,0,.28);-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);border:1px solid rgba(255,255,255,.14);direction:rtl;transition:opacity .5s}
.maphint.off{opacity:0;pointer-events:none}
.maphint .dot{width:8px;height:8px;border-radius:50%;background:var(--gold);box-shadow:0 0 0 0 rgba(227,184,102,.7);animation:pulse 1.8s infinite}
@keyframes pulse{to{box-shadow:0 0 0 12px rgba(227,184,102,0)}}

/* ---------- باکس جزئیات (شیشه‌ی مات) ---------- */
.detail{position:absolute;right:0;top:0;z-index:4;width:clamp(280px,23vw,336px);direction:rtl;max-height:100%;display:flex;flex-direction:column;overflow:hidden}
.d-head{display:flex;align-items:center;gap:8px;padding:13px 16px 11px;font-size:14.5px}
.d-head svg{color:var(--gold)}
.d-clock{margin-right:auto;font-size:13px;color:var(--ink-2)}
.d-tog{width:28px;height:28px;border-radius:50%;display:grid;place-items:center;background:rgba(255,255,255,.12);transition:background .3s}
.d-tog svg{width:16px;height:16px;color:#fff;transition:transform .6s var(--ease)}
.d-tog:hover{background:rgba(255,255,255,.24)}
.detail.closed .d-tog svg{transform:rotate(180deg)}
.d-wrap{display:grid;grid-template-rows:1fr;transition:grid-template-rows .8s var(--ease);min-height:0}
.detail.closed .d-wrap{grid-template-rows:0fr}
.d-body{min-height:0;overflow:hidden auto;padding:0 14px 12px;scrollbar-width:none}
.d-body>*{transition:opacity .6s var(--ease-out),transform .6s var(--ease-out)}
.detail.closed .d-body>*{opacity:0;transform:translateY(-8px)}
.detail .d-body>*:nth-child(2){transition-delay:.08s}.detail .d-body>*:nth-child(3){transition-delay:.16s}
.detail.swap .d-body>*{opacity:.35;transform:translateY(4px);transition-duration:.25s;transition-delay:0s}
.d-now{display:flex;align-items:center;justify-content:space-between;padding:2px 2px 10px;border-bottom:1px solid var(--line);margin-bottom:10px}
.d-temp{font-weight:200;font-size:clamp(54px,4.6vw,68px);line-height:1;direction:ltr;letter-spacing:-.03em}
.d-temp sup{font-size:.36em;font-weight:300;vertical-align:top;position:relative;top:.2em;margin-left:2px}
.d-cond{display:grid;grid-template-columns:auto auto;align-items:center;column-gap:8px;text-align:left;font-size:13.5px;font-weight:600}
.d-cond img{grid-row:span 2;width:50px;height:50px;filter:drop-shadow(0 8px 12px rgba(0,0,0,.3))}
.d-cond small{grid-column:2;font-size:11px;font-weight:400;color:var(--ink-2)}
.d-cond small b{color:#fff;font-weight:600}

.tiles{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.tile{position:relative;overflow:hidden;isolation:isolate;border-radius:var(--r-sm);padding:10px 12px 9px;background:rgba(255,255,255,.055);border:1px solid rgba(255,255,255,.1)}
.tile .bg{position:absolute;inset:0;width:100%;height:100%;z-index:-1;pointer-events:none}
.tile .lbl{display:block;font-size:11.5px;color:var(--ink-2)}
.tile .val{display:flex;align-items:baseline;gap:4px;margin-top:2px;font-size:clamp(22px,1.9vw,27px);font-weight:300;line-height:1.15}
.tile .val small{font-size:11px;font-weight:400;color:var(--ink-2)}
.tile em{display:flex;align-items:center;gap:4px;font-style:normal;font-size:11px;color:var(--ink-2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tile .arrow{flex:0 0 auto;transition:transform 1.2s var(--ease-out);color:var(--gold-2)}
/* نوار طلایی */
.bar{display:block;height:3px;margin:7px 0 6px;border-radius:3px;background:rgba(255,255,255,.13);overflow:hidden}
.bar i{display:block;height:100%;border-radius:3px;transform-origin:100% 50%;transform:scaleX(var(--v,0));
  background:linear-gradient(270deg,var(--gold-deep),var(--gold) 55%,var(--gold-2));box-shadow:0 0 10px rgba(246,217,153,.7);transition:transform 1.5s var(--ease-out)}
.detail.closed .bar i{transform:scaleX(0)}
/* پس‌زمینه‌ی شفاف هر کاشی */
.t-hum .bg path{fill:rgba(150,205,255,.09)}
.t-hum .bg .w1{animation:wv 7s linear infinite}.t-hum .bg .w2{fill:rgba(150,205,255,.07);animation:wv 11s linear infinite reverse}
@keyframes wv{to{transform:translateX(-100px)}}
.t-wind .bg path{fill:none;stroke:rgba(255,255,255,.2);stroke-width:1.1;stroke-linecap:round;stroke-dasharray:60 140;animation:flow 5s linear infinite}
.t-wind .bg path:nth-child(2){animation-duration:6.5s;stroke-dasharray:90 110;opacity:.8}
.t-wind .bg path:nth-child(3){animation-duration:4.2s;opacity:.6}
.t-wind .bg path:nth-child(4){animation-duration:7.5s;opacity:.45}
@keyframes flow{to{stroke-dashoffset:-200}}
.t-rain .bg line{stroke:rgba(170,215,255,.22);stroke-width:1;stroke-linecap:round}
.t-rain .bg .drops{animation:fall 1.6s linear infinite}
@keyframes fall{from{transform:translate(0,-40px)}to{transform:translate(-10px,0)}}
.t-pres .bg ellipse{fill:none;stroke:rgba(255,255,255,.11);stroke-width:1;transform-origin:170px 100px;animation:iso 6s ease-in-out infinite}
.t-pres .bg ellipse:nth-child(2){animation-delay:.4s}.t-pres .bg ellipse:nth-child(3){animation-delay:.8s}.t-pres .bg ellipse:nth-child(4){animation-delay:1.2s}
@keyframes iso{50%{transform:scale(1.05);stroke:rgba(246,217,153,.16)}}

.sun{margin-top:10px;padding-top:8px;border-top:1px solid var(--line)}
.sun svg{display:block;width:100%;height:auto;max-height:70px}
#sunArc{stroke-dasharray:0 1;transition:stroke-dasharray 1.6s var(--ease-out)}
#sunDot{filter:drop-shadow(0 0 6px #f6d999) drop-shadow(0 0 14px rgba(246,217,153,.8))}
.sun-row{display:flex;justify-content:space-between;font-size:11.5px;color:var(--ink-2);margin-top:2px}
.sun-row b{color:#fff;font-weight:600;margin-right:3px}
.sun-row .mid b{font-weight:500}

/* ================================================================
   نوار ساعتی (viop) — بدون پس‌زمینه، روی عکس
   ================================================================ */
.hours{grid-column:5/13;grid-row:3;position:relative;padding-top:2px;min-width:0}
.h-head{display:flex;align-items:center;gap:10px;font-size:12.5px;margin-bottom:0}
.h-head b{font-weight:600}
.h-head>span:not(.h-nav){color:var(--ink-2)}
.h-nav{margin-right:auto;display:flex;gap:6px}
.h-nav button{width:26px;height:26px;border-radius:50%;display:grid;place-items:center;background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.18);transition:background .3s}
.h-nav button:hover{background:rgba(255,255,255,.26)}
.h-nav svg{width:16px;height:16px}
.h-track{direction:rtl;display:flex;overflow-x:auto;scrollbar-width:none;scroll-behavior:smooth;cursor:grab;padding-top:16px;
  -webkit-mask-image:linear-gradient(90deg,transparent,#000 5%,#000 95%,transparent);mask-image:linear-gradient(90deg,transparent,#000 5%,#000 95%,transparent)}
.h-track::-webkit-scrollbar{display:none}
.h-track.grab{cursor:grabbing;scroll-behavior:auto}
.hr{position:relative;flex:0 0 clamp(70px,6.2vw,92px);display:flex;flex-direction:column;align-items:center;gap:3px;padding:2px 0 4px;color:var(--ink-2);
  opacity:0;transform:translateY(10px);animation:hin .6s var(--ease-out) forwards;animation-delay:calc(var(--i) * 28ms)}
@keyframes hin{to{opacity:1;transform:none}}
.hr .t{font-size:11px;direction:ltr}
.hr img{width:26px;height:26px;margin:0;filter:drop-shadow(0 6px 8px rgba(0,0,0,.3));transition:transform .35s var(--ease-out)}
.hr .d{font-size:16px;font-weight:300;color:#fff;direction:ltr;line-height:1.2}
.hr .p{font-size:10px;color:#bfe1ff;min-height:12px;direction:ltr;line-height:1.2}
.hr:hover img{transform:translateY(-3px) scale(1.08)}
.hr.past{opacity:.45!important}
.hr.now .t{font-size:13px;font-weight:700;color:var(--gold-2)}
.hr.now img{width:32px;height:32px;margin:-3px 0 -2px}
.hr.now .d{font-size:19px;font-weight:600}
.hr.now::before{content:"";position:absolute;top:-22px;left:50%;width:1px;height:26px;background:linear-gradient(180deg,transparent,rgba(255,255,255,.9));box-shadow:0 0 8px #fff}
.hr.now::after{content:"";position:absolute;top:-25px;left:50%;width:6px;height:6px;margin-left:-3px;border-radius:50%;background:#fff;box-shadow:0 0 10px #fff,0 0 18px var(--gold)}

.foot{grid-column:2/13;grid-row:4;display:flex;justify-content:space-between;align-items:center;padding:4px 0 0;direction:rtl}
.foot a.credit:hover{color:var(--gold)}

/* بازشدن نرم بخش‌ها در لود اولیه */
.reveal{opacity:0;transform:translateY(14px);animation:rv .9s var(--ease-out) forwards}
.sec2 .reveal:nth-child(1){animation-delay:.15s}.sec2 .reveal:nth-child(2){animation-delay:.25s}.sec2 .reveal:nth-child(3){animation-delay:.35s}
.sec2 .reveal:nth-child(4){animation-delay:.45s}.sec2 .reveal:nth-child(5){animation-delay:.6s}.sec2 .now{animation-delay:.5s}.sec2 .week{animation-delay:.65s}
@keyframes rv{to{opacity:1;transform:none}}
.headline.swap span,.lede.swap{animation:sw .7s var(--ease-out) both}
@keyframes sw{from{opacity:0;transform:translateY(8px)}}

/* ---------- ارتفاع کم (لپ‌تاپ‌ها) ---------- */
@media (max-height:780px) and (min-width:901px){
  .lede{line-height:1.8;font-size:12.5px}
  .tiles{gap:6px}.tile{padding:8px 10px 7px}.bar{margin:5px 0 4px}
  .sun svg{max-height:54px}
  .d-now{padding-bottom:6px;margin-bottom:8px}
  .hr img{width:28px;height:28px}
}
@media (max-height:700px) and (min-width:901px){ .sun{display:none} .lede{display:none} }

/* ---------- تبلت/موبایل ---------- */
@media (max-width:1100px) and (min-width:901px){ .home{column-gap:14px;padding:16px 14px 8px} .sec2{grid-column:2/6} .sec1{grid-column:6/13} .hello{grid-column:2/7} }
@media (max-width:900px){
  body[data-page=home]{overflow:auto}
  .home{height:auto;min-height:100vh;display:flex;flex-direction:column;padding:16px 16px 18px 16px;gap:18px}
  .hello{padding:64px 0 0;min-height:0}
  .sec2{padding-top:0}
  .headline{font-size:34px}
  .now-t{font-size:96px}
  .week{margin-top:22px}
  .sec1{display:flex;flex-direction:column;gap:14px}
  .map{position:relative;width:100%;height:auto;order:2}
  .maphint{position:static;order:1;align-self:center}
  .detail{position:relative;width:100%;order:3}
  .hours{padding-top:0}
  .foot{flex-direction:column;gap:6px;align-items:center}
}

/* حلقه‌ی فوکوس مرورگر دور شهرستان کلیک‌شده (مربع) نمایش داده نشود؛ هایلایت با خود نقشه است */
#map :focus,#map :focus-visible,.map :focus,.map :focus-visible,.map path,.map g{outline:none!important;-webkit-tap-highlight-color:transparent}
/* حالت سبک برای دستگاه‌های ضعیف/قدیمی: بدون تاری پشت شیشه، سایه‌های سنگین، ابر و ذرات و انیمیشن‌های بی‌پایان */
html.lite *,html.lite *::before,html.lite *::after{-webkit-backdrop-filter:none!important;backdrop-filter:none!important;animation-iteration-count:1!important}
html.lite #mapBase,html.lite #mapSel path.top,html.lite .wave .ln,html.lite .wave .spark,html.lite #sunDot,html.lite .now-i,html.lite .d-cond img,html.lite .hr img{filter:none!important}
html.lite #scene .clouds,html.lite #scene .fogband,html.lite #scene .glare,html.lite #scene canvas{display:none!important}
html.lite .detail,html.lite .rail,html.lite .maphint{background-color:rgba(18,30,36,.62)!important}

/* لوگو + تاریخ بالا-راست */
.brand{position:fixed;z-index:60;top:var(--gutter,22px);right:var(--gutter,22px);display:flex;flex-direction:column;align-items:flex-end;gap:5px;text-decoration:none;color:#fff;direction:rtl}
.brand img{display:block;height:46px;width:auto;filter:drop-shadow(0 4px 12px rgba(0,0,0,.4))}
.brand-d{font-size:12.5px;font-weight:600;letter-spacing:.01em;text-shadow:0 2px 10px rgba(0,0,0,.55);opacity:.95}
@media (max-width:900px){.brand img{height:38px}.brand-d{font-size:11.5px}}
