/* v28 — mobile-first refinement + controlled English display typography */
html,body{width:100%;max-width:100%;overflow-x:clip}
main,section,.hero,.hero-copy,.hero-art,.planet,.page-hero,.mandegar-map,.mandegar-stage{min-width:0}

/* English display typography: script-like, but constrained to Persian proportions */
html[lang="en"] .display-script,
html[lang="en"] .page-hero h1,
html[lang="en"] .section-title h2,
html[lang="en"] .about-copy h2,
html[lang="en"] .contact-card h2,
html[lang="en"] .service-panel h2{
  font-family:"Segoe Script","Snell Roundhand","Brush Script MT","Apple Chancery",cursive!important;
  font-weight:600!important;
  letter-spacing:-.035em!important;
}
html[lang="en"] .display-script{
  font-size:clamp(52px,5.15vw,78px)!important;
  line-height:1.03!important;
  max-width:690px;
  padding:.06em .03em .22em!important;
  margin:18px 0 16px!important;
}
html[lang="en"] .display-script span,
html[lang="en"] .display-script em{
  display:block;
  width:100%;
  font-family:inherit!important;
  font-style:normal;
  line-height:1.08!important;
  white-space:normal;
  overflow:visible;
}
html[lang="en"] .display-script em{margin-top:.06em!important;padding-top:0!important}
html[lang="en"] .hero-copy>p{max-width:660px}
html[lang="en"] .planet button{font-size:10.5px;line-height:1.35;width:122px;padding-inline:9px}
html[lang="en"] .logo-core span{font-family:"Segoe UI",Arial,sans-serif;letter-spacing:.02em}

@media (min-width:901px) and (max-width:1180px){
  html[lang="en"] .hero{grid-template-columns:minmax(0,1.05fr) minmax(430px,.95fr);gap:14px}
  html[lang="en"] .display-script{font-size:clamp(48px,5vw,66px)!important}
  html[lang="en"] .planet{width:min(540px,43vw);height:min(540px,43vw)}
  html[lang="en"] .planet button{width:112px;font-size:9.5px}
}

/* Tablet/mobile layout */
@media (max-width:900px){
  body{overflow-x:hidden!important}
  .site-header{left:12px!important;right:12px!important;transform:none!important;width:auto!important;top:max(10px,env(safe-area-inset-top))!important;height:64px!important;min-height:64px!important;padding:8px 10px!important;border-radius:18px!important}
  .site-header .brand{flex:1;min-width:0!important;max-width:160px!important}
  .site-header .brand .brand-logo-svg{width:min(145px,38vw)!important;max-height:42px!important}
  .header-actions{flex:0 0 auto;gap:5px!important}
  .theme-toggle,.lang,.menu-btn{width:38px!important;height:38px!important;min-width:38px!important;padding:0!important;border-radius:12px!important}
  .site-header nav{width:min(88vw,360px)!important;padding:92px 16px calc(24px + env(safe-area-inset-bottom))!important;gap:7px!important}
  .site-header nav a,.site-header nav button{min-height:46px!important;font-size:13px!important}

  .hero{padding:102px 16px 52px!important;gap:30px!important;min-height:auto!important;align-items:start!important}
  .hero-copy{max-width:620px!important;width:100%!important}
  .hero-copy .eyebrow{display:inline-flex;max-width:92%;justify-content:center;padding:8px 12px;border-radius:999px;background:rgba(99,230,255,.055);border:1px solid rgba(99,230,255,.1)}
  .display-script{font-size:clamp(45px,13.4vw,64px)!important;line-height:1.38!important;margin:15px 0 12px!important;padding:.04em .12em .34em!important;max-width:100%!important}
  .display-script span,.display-script em{max-width:100%;overflow:visible!important}
  .display-script em{margin-top:.22em!important}
  .hero-copy>p{max-width:560px!important;font-size:12.5px!important;line-height:2.05!important;padding-inline:4px}
  .actions{gap:9px!important}.actions .pill{min-width:0!important;flex:1 1 138px;max-width:210px;padding:12px 13px!important}
  .metrics{width:100%;max-width:560px;margin-inline:auto!important;gap:8px!important}.metrics>div{min-width:0;border-radius:16px!important}

  .hero-art{width:100%!important;margin:0 auto!important;overflow:visible!important}
  .planet{width:100%!important;max-width:580px!important;margin-inline:auto!important;padding:12px 0 0!important;display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:9px!important;height:auto!important;background:radial-gradient(circle at 50% 15%,rgba(99,230,255,.13),transparent 48%)!important}
  .planet .logo-core{grid-column:1/-1!important;width:142px!important;height:142px!important;margin:0 auto 10px!important;box-shadow:0 0 48px rgba(99,230,255,.18),inset 0 0 25px rgba(255,255,255,.06)!important}
  .planet button{width:100%!important;min-width:0!important;min-height:54px!important;padding:9px 7px!important;margin:0!important;line-height:1.45!important;font-size:10.5px!important;text-align:center!important;border-radius:15px!important;white-space:normal!important;word-break:normal!important;overflow-wrap:anywhere!important}
  html[lang="en"] .planet button{font-size:9.4px!important;letter-spacing:-.01em!important}
  .planet button:nth-of-type(odd){transform:translateY(4px)!important}.planet button:nth-of-type(even){transform:translateY(-2px)!important}
  .planet button:hover,.planet button:focus-visible{transform:translateY(-3px)!important}

  .access{margin-top:0!important}.access a{border-radius:18px!important}
  .product-teaser{padding-top:62px!important}.stack-cards{width:100%!important}
  .horizontal-section{height:auto!important;min-height:0!important;padding:68px 0!important}.horizontal-section .sticky{position:relative!important;top:auto!important;height:auto!important;overflow:visible!important}.horizontal-track{transform:none!important;padding:0!important}
  .story{box-shadow:0 18px 55px rgba(0,0,0,.18)!important}
  .about,.contact{overflow:visible!important}.about-visual{order:2}.about-copy{order:1}.year-ring{max-width:70vw;max-height:70vw}
  .contact-lines>*{min-width:0;overflow-wrap:anywhere;word-break:break-word}.contact-orb{flex-shrink:0}

  .page-hero{padding:112px 16px 48px!important;text-align:center!important}.page-hero h1{max-width:760px;margin-inline:auto!important}.page-hero p{margin-inline:auto!important}
  html[lang="en"] .page-hero h1{font-size:clamp(35px,9.5vw,52px)!important;line-height:1.14!important;letter-spacing:-.025em!important}
  .mandegar-map{width:100%!important;padding-inline:12px!important}.mandegar-stage{width:100%!important}
  .module-node{overflow-wrap:anywhere!important;line-height:1.45!important}.module-preview{width:100%!important}
  .family-card,.download-card{overflow:hidden}.family-card p,.download-card p{overflow-wrap:anywhere}
  footer{overflow:hidden}.footer-grid>*{min-width:0}.footer-grid p,.footer-grid span,.footer-grid a{overflow-wrap:anywhere}
}

@media (max-width:520px){
  .site-header{left:8px!important;right:8px!important;padding-inline:8px!important}
  .site-header .brand{max-width:128px!important}.site-header .brand .brand-logo-svg{width:min(122px,34vw)!important}
  .hero{padding:94px 12px 44px!important;gap:24px!important}
  .display-script{font-size:clamp(41px,13vw,54px)!important;line-height:1.42!important;padding-inline:.16em!important}
  html[lang="en"] .display-script{font-size:clamp(37px,10.8vw,48px)!important;line-height:1.08!important;margin-top:18px!important;padding:0 .05em .2em!important;letter-spacing:-.045em!important}
  html[lang="en"] .display-script em{margin-top:.12em!important}
  html[lang="en"] .hero-copy .eyebrow{font-size:9.5px!important;line-height:1.55!important}
  .hero-copy>p{font-size:12px!important;line-height:1.95!important}
  .metrics{grid-template-columns:repeat(3,minmax(0,1fr))!important}.metrics>div:last-child{grid-column:auto!important}.metrics strong{font-size:19px!important}.metrics span{font-size:8px!important;line-height:1.45}
  .planet{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}.planet .logo-core{width:126px!important;height:126px!important}.planet button{min-height:50px!important;font-size:9.8px!important;padding:8px 5px!important}
  html[lang="en"] .planet button{font-size:8.7px!important;line-height:1.3!important}
  .access{width:calc(100% - 24px)!important;grid-template-columns:repeat(2,minmax(0,1fr))!important}.access a{min-height:112px!important}.access a:last-child:nth-child(odd){grid-column:1/-1}
  .section{padding-inline:12px!important}.section-title h2,.about-copy h2,.contact-card h2{font-size:clamp(30px,9.2vw,42px)!important}
  .story{min-height:215px!important;padding:22px!important}.story h2,.story h3{font-size:25px!important}
  .contact-card{padding:22px 14px!important}.contact-lines{gap:8px!important}.contact-lines>*{font-size:11px!important;padding:11px!important}
  .page-hero{padding-inline:12px!important}.mandegar-stage{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important;padding-inline:8px!important}.mandegar-center{grid-column:1/-1!important;width:136px!important;height:136px!important}.module-node{font-size:9.2px!important;min-height:52px!important;padding:7px 5px!important}.module-preview{grid-column:1/-1!important;padding:17px!important}.module-preview h3{font-size:21px!important}.module-preview p{font-size:11px!important;line-height:1.85!important}
  html[lang="en"] .module-node{font-size:8.5px!important}.family-card{min-height:290px!important;padding:22px!important}.download-card{padding:18px!important}
  .service-panel aside{width:calc(100% - 16px)!important;max-height:90dvh!important;border-radius:22px!important}.service-panel h2{font-size:31px!important}
}

@media (max-width:360px){
  .site-header .brand{max-width:112px!important}.site-header .brand .brand-logo-svg{width:108px!important}.theme-toggle,.lang,.menu-btn{width:35px!important;height:35px!important;min-width:35px!important}
  .display-script{font-size:39px!important}.metrics{gap:5px!important}.metrics>div{padding:11px 3px!important}.planet button{font-size:9px!important}.access{grid-template-columns:1fr!important}.access a:last-child:nth-child(odd){grid-column:auto}
}

@media (prefers-reduced-motion:reduce){.planet button{transform:none!important}.aurora,.star-grid{animation:none!important}}
