/* Homepage styles. Shared styles are in site.css. */
/* ---------- hero carousel ---------- */
.hero{position:relative;height:clamp(520px,calc(100vh - 240px),860px);overflow:hidden;background:var(--night);touch-action:pan-y}
.hero-track{display:flex;height:100%;transition:transform .6s cubic-bezier(.5,0,0,.75)}
.hs{position:relative;flex:0 0 100%;height:100%;overflow:hidden}
.hs .bg{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.hs::after{content:"";position:absolute;inset:0;background:linear-gradient(180deg,rgba(0,0,0,.28) 0%,rgba(0,0,0,0) 38%);pointer-events:none}
.hs-copy{position:absolute;z-index:2;top:48px;left:0;right:0;display:flex;flex-direction:column;align-items:center;text-align:center;color:#fff;padding:0 16px}
.hs-title{margin:0;font-family:var(--disp);font-size:56px;line-height:64px;font-weight:500;letter-spacing:-.01em}
.hs-sub{margin-top:2px;font-size:20px;line-height:28px;text-decoration:underline;text-underline-offset:5px;text-decoration-thickness:1px}
.hs-sub:hover{text-decoration-thickness:2px}
.hs .btns{margin-top:24px;justify-content:center}
.hero .dots{position:absolute;z-index:5;left:0;right:0;bottom:16px}
.hero .dots button{background:rgba(255,255,255,.5)}
.hero .dots button.on{background:#fff}
/* ---------- feature card (tesla FSD card) ---------- */
.feat{display:flex;justify-content:space-between;gap:40px;background:var(--card);border-radius:var(--r);padding:48px;min-height:454px}
.feat-l{display:flex;flex-direction:column;flex:0 1 480px}
.grad{background:linear-gradient(90deg,var(--indigo) 0%,var(--blue) 100%);-webkit-background-clip:text;background-clip:text;color:transparent}
.feat-sub{margin:12px 0 0;font-size:17px;line-height:26px;color:var(--gray)}
.stats{display:flex;gap:40px;margin-top:auto;padding-top:40px}
.stat-n{font-family:var(--disp);font-size:34px;line-height:42px;font-weight:500;font-variant-numeric:tabular-nums}
.stat-l{font-size:15px;line-height:22px;color:var(--gray)}
.feat .btns{margin-top:32px}
.phones{display:flex;gap:40px;align-items:flex-start;padding-right:8px}
.phone{margin:0;width:208px}
.phone:nth-child(2){margin-top:48px}
.phone .scr{width:208px;height:372px;border-radius:24px;overflow:hidden;background:var(--night);box-shadow:0 2px 10px rgba(0,0,0,.08)}
.phone video{width:100%;height:100%;object-fit:cover}
.phone figcaption{margin-top:12px;font-size:17px;font-weight:500;text-align:center}

/* ---------- card carousel ---------- */
.cc{position:relative;margin-top:48px}
.cc-track{display:flex;gap:24px;overflow-x:auto;scroll-snap-type:x mandatory;scroll-padding:0 var(--side);padding:0 var(--side);scrollbar-width:none;-webkit-overflow-scrolling:touch;overscroll-behavior-x:contain}
.cc-track::-webkit-scrollbar{display:none}
.cc-track::after{content:"";flex:0 0 1px;margin-left:calc(var(--side) - 24px - 1px)}
.ccard{position:relative;flex:0 0 calc((100vw - 96px) * .762);aspect-ratio:1024/580;border-radius:var(--r);overflow:hidden;scroll-snap-align:start;color:#fff;background:var(--night)}
.ccard .bg{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;transition:transform .8s}
.ccard:hover .bg{transform:scale(1.02)}
.ccard::after{content:"";position:absolute;inset:0;background:linear-gradient(0deg,rgba(0,0,0,.5) 0%,rgba(0,0,0,0) 48%),linear-gradient(180deg,rgba(0,0,0,.28) 0%,rgba(0,0,0,0) 26%);pointer-events:none}
.cc-eye{position:absolute;z-index:2;top:40px;left:40px;font-size:17px;font-weight:500}
.cc-bot{position:absolute;z-index:2;left:40px;right:40px;bottom:40px}
.cc-sub{margin:2px 0 0;font-size:20px;line-height:28px}
a.cc-sub{display:inline-block;text-decoration:underline;text-underline-offset:5px;text-decoration-thickness:1px}
.cc-bot .btns{margin-top:24px}
.cc .arrow{background:rgba(255,255,255,.92);box-shadow:0 2px 6px rgba(0,0,0,.12);margin-top:-40px}
.cc .arrow[disabled]{opacity:0;pointer-events:none}
.cc .dots{margin-top:20px}

/* ---------- promo pair ---------- */
.promos{display:grid;grid-template-columns:1fr 1fr;gap:24px}
.promo{position:relative;display:flex;justify-content:space-between;background:var(--card);border-radius:var(--r);min-height:264px;overflow:hidden}
.promo-txt{padding:48px;display:flex;flex-direction:column;align-items:flex-start;flex:1 1 auto;min-width:0}
.promo-txt p{margin:8px 0 24px;font-size:20px;line-height:28px;color:var(--gray);max-width:340px}
.promo-txt .btn{margin-top:auto}
.promo-sm{align-self:center;width:200px;height:180px;margin-right:40px;border-radius:8px;object-fit:cover;flex:0 0 auto}
.promo-tall{display:block;width:220px;flex:0 0 220px}
.promo-tall img{display:block;width:100%;height:100%;object-fit:cover;object-position:50% 20%}

/* ---------- rank field (tesla charging map) ---------- */
.rank-map{position:relative;border-radius:var(--r);overflow:hidden;background:var(--rule2);height:550px}
.rank-map canvas{display:block;width:100%;height:100%}
.chip{position:absolute;left:10px;bottom:10px;height:40px;padding:0 14px 0 12px;display:flex;align-items:center;gap:8px;background:#fff;border-radius:4px;font-size:14px;font-weight:500;box-shadow:0 1px 4px rgba(0,0,0,.12)}
.chip svg{width:20px;height:20px}
.expand{position:absolute;right:10px;bottom:10px;width:40px;height:40px;border-radius:50%;background:#fff;display:grid;place-items:center;box-shadow:0 1px 4px rgba(0,0,0,.12)}
.expand svg{width:20px;height:20px}
.rank-info{display:flex;justify-content:space-between;align-items:flex-start;gap:40px;padding:40px 48px 0}
.rank-info p{margin:4px 0 0;font-size:20px;line-height:28px;color:var(--gray);max-width:740px}
.rank-info .btns{margin-top:36px;gap:16px}
.rank-stats{display:flex;gap:40px;padding-top:4px}
.rs-n{display:flex;align-items:center;gap:6px;font-family:var(--disp);font-size:48px;line-height:56px;font-weight:500;font-variant-numeric:tabular-nums}
.rs-ic{width:46px;height:46px;border-radius:50%;display:grid;place-items:center;color:#fff}
.rs-ic svg{width:26px;height:26px}
.rs-ic.red{background:var(--red)}.rs-ic.gray{background:var(--gray)}
.rs-l{font-size:20px;line-height:28px;color:var(--gray)}

/* ---------- responsive (homepage) ---------- */
@media (max-width:1199px){
  .feat{flex-direction:column}
  .feat-l{flex:none}
  .phones{overflow-x:auto;padding-bottom:4px;scrollbar-width:none}
  .phones::-webkit-scrollbar{display:none}
  .phone{flex:0 0 208px}
  .phone:nth-child(2){margin-top:0}
}
@media (max-width:899px){
  .hs-title{font-size:40px;line-height:48px}
  .promos{grid-template-columns:1fr}
  .rank-info{flex-direction:column;padding:32px 24px 0}
  .ccard{flex-basis:calc(100vw - 48px);aspect-ratio:4/5}
  .cc-track::after{margin-left:-1px}
  .cc .arrow{display:none}
}
@media (max-width:599px){
  .hero{height:clamp(560px,calc(100svh - 112px),760px)}
  .hs-copy{top:40px}
  .hs-title{font-size:36px;line-height:44px}
  .hs-sub{font-size:16px;line-height:24px}
  .hero .arrow{display:none}
  .hs-btnrow{position:absolute;z-index:3;left:16px;right:16px;bottom:44px;display:flex;gap:8px}
  .hs-btnrow .btn{flex:1;min-width:0;padding:0 8px}
  .hs .btns.top{display:none}
  .feat{padding:32px 24px;min-height:0}
  .stats{gap:24px;flex-wrap:wrap;padding-top:28px}
  .stat-n{font-size:28px;line-height:36px}
  .feat .btns .btn{flex:1 1 100%;min-width:0}
  .promo .btn{align-self:stretch;min-width:0}
  .phones{margin:0 -24px;padding:0 24px 4px;gap:16px}
  .phone{flex:0 0 168px;width:168px}
  .phone .scr{width:168px;height:300px;border-radius:20px}
  .phone figcaption{font-size:15px}
  .ccard{flex-basis:calc(100vw - 32px)}
  .cc-eye{top:24px;left:24px;font-size:15px}
  .cc-bot{left:24px;right:24px;bottom:24px}
  .cc-sub{font-size:16px;line-height:24px}
  .cc-bot .btns{flex-wrap:nowrap}
  .cc-bot .btn{flex:1;min-width:0;padding:0 8px}
  .promo{flex-direction:column;min-height:0}
  .promo-txt{padding:32px 24px}
  .promo-txt p{font-size:17px;line-height:26px}
  .promo-sm{width:calc(100% - 48px);height:180px;margin:0 24px 24px;align-self:auto}
  .promo-tall{width:100%;flex-basis:auto;height:260px}
  .promo-tall img{object-position:50% 35%}
  .rank-map{height:auto}
  .rank-info{padding:28px 8px 0}
  .rank-info p{font-size:17px;line-height:26px}
  .rank-info .btns{gap:8px;width:100%}
  .rank-info .btn{flex:1}
  .rank-stats{gap:28px;flex-wrap:wrap}
  .rs-n{font-size:36px;line-height:44px}
  .rs-ic{width:36px;height:36px}.rs-ic svg{width:20px;height:20px}
  .rs-l{font-size:15px;line-height:22px}
}
@media (min-width:600px){ .hs-btnrow{display:none} }
.rank-side .rank-note{margin:6px 0 0;max-width:430px;text-align:right;font-size:14px;line-height:21px;color:var(--ink2)}
@media (max-width:899px){.rank-side .rank-note{text-align:left}}
.rank-side{display:flex;flex-direction:column;align-items:flex-end;gap:10px}
.rank-side .asof{text-align:right}
@media (max-width:899px){.rank-side{align-items:flex-start}.rank-side .asof{text-align:left}}
